zanders-php-markdown/Readme.php
Zander Thannhauser c7c8b4929b
Some checks are pending
CI / Linting - PHP 7.4 (push) Waiting to run
CI / Linting - PHP 8.0 (push) Waiting to run
CI / Linting - PHP 8.1 (push) Waiting to run
CI / Linting - PHP 8.2 (push) Waiting to run
added tom cells
2025-11-23 16:45:07 -06:00

34 lines
788 B
PHP

<?php
// This file passes the content of the Readme.md file in the same directory
// through the Markdown filter. You can adapt this sample code in any way
// you like.
// Install PSR-4-compatible class autoloader
spl_autoload_register(function($class) {
require str_replace('\\', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
});
// If using Composer, use this instead:
//require 'vendor/autoload.php';
// Get Markdown class
use Michelf\MarkdownExtra;
// Read file and pass content through the Markdown parser
$text = file_get_contents('Readme.md');
$html = MarkdownExtra::defaultTransform($text);
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP Markdown Lib - Readme</title>
</head>
<body>
<?php
// Put HTML content in the document
echo $html;
?>
</body>
</html>