<?php

  
if (ereg("wrapper\.php$",$_SERVER['PHP_SELF'])) {
    exit;
  }

  function 
getmicrotime(){
    list(
$usec$sec) = explode(" ",microtime());
    return ((float)
$usec + (float)$sec);
  }
  
$time_start getmicrotime();

  
$my_dir $_SERVER['DOCUMENT_ROOT'];
  
$my_name ereg_replace("\.php$","",$_SERVER['PHP_SELF']);

  
$my_php  $_SERVER['PHP_SELF'];
  
$my_html $my_name .".inc";
  
$my_meta $my_html .".meta";

  
$my_header ereg_replace("\n","",file_get_contents($my_dir $my_meta));

  if (isset(
$_GET['debug'])) {
    echo 
"<HTML>\n";
    echo 
"<head>\n<Title>Debugging: $my_name</Title>\n</head>\n";
    echo 
"\n";
    echo 
"<body>\n";
    echo 
"<PRE>";
    echo 
"Dir: $my_dir\n";
    echo 
"\n";
    echo 
"Original:  $my_php\n";
    echo 
"HTML:      $my_html\n";
    echo 
"Meta File: $my_meta\n";
    echo 
"<hr>\n";
    echo 
"'"$my_header ."'";
    echo 
"</PRE>\n";
    echo 
"<hr>\n\n";
  } else {
    
header($my_header);
  }

  
readfile($my_dir $my_html);

  
$time_end getmicrotime();
  
$time $time_end $time_start;

  echo 
"<!-- Generated in $time -->";

  if (isset(
$_GET['debug'])) {
    echo 
"\n<br>\n<br>\nGenerated in $time seconds.<br>\n<br>";
    echo 
"<HTML>\n";
  }

?>