topical media & game development

talk show tell print

professional-search-06-seophp-test-markup.php / php



  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html>
    <head>
      <title>Testing HTML Markup Translator</title>
    </head>
    <body>
  
  <?php
  
  // include custom markup library
  require_once 'include/custom_markup.inc.php';
  
  // set input file name
  file_name = 'markup.txt';
  
  // open markup file from disk
  handle = fopen(file_name, 'r');
  
  // check if the files was opened successfully
  if (handle)
  {
    // read file contents
    markup = fread(handle, filesize("markup.txt"));
  
    // translate and display custom markup
    translated = custom_markup_translate(markup);
    echo translated;
  }
  else
  {
    // display error message
    echo "Couldn't open file_name!";
  }
  
  ?>
  
    </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.