【发布时间】:2016-08-12 07:10:34
【问题描述】:
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$my_text = " a";
use \Michelf\Markdown;
$my_html = Markdown::defaultTransform($my_text);
echo "end";
不幸的是,它不起作用。我得到了错误:
致命错误: 未捕获的错误:在 /path/to/index.php:8 中找不到类 'Michelf\Markdown' 堆栈跟踪:在 /path 中抛出 #0 {main} /to/index.php 第 8
行
我搜索了一下,发现有人had a similar issue。但是添加 'Michelf\' 并没有改变任何东西:
$my_html = \Michelf\Markdown::defaultTransform($my_text);
我收到了同样的错误信息。
这是我的文件树:
/path/to/
|- index.php
`- Michelf/
|- Markdown.php
|- MarkdownInterface.php
`- […]
【问题讨论】: