In this repo i store all my websites, each in a different branch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
739 B

  1. <?php
  2. // This file passes the content of the Readme.md file in the same directory
  3. // through the Markdown filter. You can adapt this sample code in any way
  4. // you like.
  5. // Install PSR-0-compatible class autoloader
  6. spl_autoload_register(function($class){
  7. require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
  8. });
  9. // Get Markdown class
  10. use \Michelf\Markdown;
  11. // Read file and pass content through the Markdown parser
  12. $text = file_get_contents('Readme.md');
  13. $html = Markdown::defaultTransform($text);
  14. ?>
  15. <!DOCTYPE html>
  16. <html>
  17. <head>
  18. <title>PHP Markdown Lib - Readme</title>
  19. </head>
  20. <body>
  21. <?php
  22. // Put HTML content in the document
  23. echo $html;
  24. ?>
  25. </body>
  26. </html>