dsy1971 2019-02-19 05:44
浏览 152

在php WAMP服务器(win10)上通过Composer运行Markdownify?

I'm trying to include and use Markdownify in my PHP script on a local server in windows 10, but it does not work.

  • I have WAMP64 server installed, on which I run my PHP files locally.
  • I've downloaded Composer and installed it.
  • During Composer installation I picked php.exe from my WAMP64 server when prompted.
  • In a CMD I have then entered "composer require pixel418/markdownify", the command was recognized and completed.
  • Now I try to define in my PHP code:

$converter = new Markdownify\Converter;

but it does not work. Instead I get the error message:

Fatal error: Uncaught Error: Class 'Markdownify\Converter' not found in D:\wamp64\www\mysite\investigate.php:16 Stack trace: #0 {main} thrown in D:\wamp64\www\mysite\investigate.php on line 16

Any hint on how to make this work?

  • 写回答

1条回答 默认 最新

  • duanbi5906 2019-02-20 16:47
    关注

    You need to these lines in your script so PHP knows where to get the classes from

    namespace Markdownify;
    use Markdownify\Converter;
    
    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试