开发者

Having trouble with Textile PHP parser for MarkItUp

开发者 https://www.devze.com 2023-04-11 20:29 出处:网络
I\'ve created a Jekyll based blog using Textile markdown, and I was working on creating an editor using Markitup I am having a heck of a time getting the php textile parser to work so I can see the pr

I've created a Jekyll based blog using Textile markdown, and I was working on creating an editor using Markitup I am having a heck of a time getting the php textile parser to work so I can see the preview. I've downloaded the Textile Official PHP Parser, and just can't seem to figure it out.

I've found numerous examples on how to use Markdown but examples for using Textile seem to be a little slim.

Here is the code to use Markdown:

<?php
include_once "markdown.php";
$html=Markdown($_POST['data']);
echo htmlentities($html); \
?>

And the example.php开发者_StackOverflow社区 from the Textile Official PHP Parser:

<?php
require_once('classTextile.php');
$textile = new Textile();
$in = <<<EOF
A *simple* example.
EOF;
echo $textile->TextileThis($in);
?>

And this is what I've clobbered together on my own:

<?php
require_once ('classTextile.php');
$textile = new Textile();
echo $textile->TextileThis($_POST['data']);
?>

Could someone tell me what I'm doing wrong here? Would be very grateful for any help, I normally don't code websites, I just keep the servers running :)

Thanks!!


Answer, just in case anyone else is looking for this, the last example I posted:

<?php
require_once ('classTextile.php');
$textile = new Textile();
echo $textile->TextileThis($_POST['data']);
?>

Works perfectly, just as long as your path is part of open_basedir

derp.

0

精彩评论

暂无评论...
验证码 换一张
取 消