我对 PHP 相当陌生。我试图让我的代码根据 GET 属性“pgid”的内容读取 Markdown 文件的内容,然后将其输出。这个:
print Parsedown::instance()->text("Testing *Markdown* with **Parsedown**")
结果输出
使用Parsedown测试Markdown
但是这个:
print (Parsedown::instance()->text(readfile("./".$_GET['pgid'].".md")));
和存在?pgid=about
的内容,输出是about.md
Testing *Markdown* with **Parsedown**
使用 **Parsedown** 测试 *Markdown* 39
我不确定为什么我可以让所有部分单独工作,但不能一起工作。