_ >   1 1 <?php
< >   2  
  3   $start = getmicrotime();
  4  
  5   define('ADMIN', 1);
  6   define('FULL_PATH', realpath(dirname(__FILE__).'/..') );
  7   define('APPLICATION_CLASS', 'MyApplication');
  8   include_once(FULL_PATH.'/kernel/kernel4/startup.php');
  9  
  10   /*
  11           kApplication $application
  12   */
  13   $application =& kApplication::Instance();
  14   $application->Init();
  15   $application->Run();
  16   $application->Done();
  17  
  18   $end = getmicrotime();
  19  
  20   if ($application->isDebugMode() && !dbg_ConstOn('DBG_SKIP_REPORTING')) {
  21           echo '  <br><br>
  22                           <style> .dbg_flat_table TD { font-family: arial,verdana; font-size: 9pt; } </style>
  23                           <table class="dbg_flat_table">
  24                                   <tr>
  25                                           <td>Memory used:</td>
  26                                           <td>'.round(memory_get_usage()/1024/1024, 1).' MB ('.memory_get_usage().')</td>
  27                                   </tr>
  28                                   <tr>
  29                                           <td>Time used:</td>
  30                                           <td>'.round(($end - $start), 5).' sec</td>
  31                                   </tr>
  32                           </table>';
  33   }
  34  
  35   function getmicrotime()
  36   {
  37       list($usec, $sec) = explode(" ", microtime());
  38       return ((float)$usec + (float)$sec);
  39   }
  40  
  41   //update_memory_check_script();
  42  
  43   function update_memory_check_script() {
  44           $files = get_included_files();
  45           $script = '$files = Array('."\n";
  46           foreach ($files as $file_name) {
  47                   $script .= "\t\t'".str_replace(FULL_PATH, '', $file_name)."',\n";
  48           }
  49           $script .= ");\n";
  50           echo "<pre>";
  51           echo $script;
  52           echo "</pre>";
  53   }
  54  
    2         include_once 'index.php';
< _   55 3 ?>