PEAR2_Text_Markdown-0.1.0PEAR2_Text_Markdown-0.1.0/doc/pear2.php.net/PEAR2_Text_Markdown/examples/examples/example1.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
function autoload($class)
{
    $class = str_replace(array('PEAR2\\Text\\', '_'), array('', '/'), $class);
    include $class . '.php';
}
    
spl_autoload_register("autoload");

set_include_path(dirname(dirname(__FILE__)).'/src/Text');

ini_set('display_errors', true);
error_reporting(E_ALL);

$markdown = new \PEAR2\Text\Markdown_Main();

echo $markdown->transform(file_get_contents('http://daringfireball.net/projects/markdown/basics.text'));
EOF