一个(希望)快速的问题--我如何在PHP中使用Textile?与在中一样,我有一些textile格式的文本,我希望使用php将其转换为html。如果我用的是Ruby,我会用RedCloth,但是我似乎找不到一个类似的php解决方案。
有人有什么想法吗?
发布于 2010-08-12 20:55:36
例如,获取the original Textile library。
发布于 2012-10-02 00:07:56
更具体地说,示例文件包含以下内容:
// A simple example
require_once('classTextile.php');
$textile = new Textile();
$in = <<<EOF
A *simple* example.
EOF;
echo $textile->TextileThis($in);
// For untrusted user input, use TextileRestricted instead:
// echo $textile->TextileRestricted($in);对于那些可能对Heredoc字符串语法感到困惑的人(像我自己),这里是基本形式。
require_once('classTextile.php');
$textile = new Textile();
echo $textile->TextileThis('A *simple* example.');https://stackoverflow.com/questions/3467809
复制相似问题