[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/PHPMarkdown/ -> Readme.php (source)

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


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1