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   function getmicrotime()
  21   {
  22       list($usec, $sec) = explode(" ", microtime());
  23       return ((float)$usec + (float)$sec);
  24   }
  25  
  26   //update_memory_check_script();
  27  
  28   function update_memory_check_script() {
  29           $files = get_included_files();
  30           $script = '$files = Array('."\n";
  31           foreach ($files as $file_name) {
  32                   $script .= "\t\t'".str_replace(FULL_PATH, '', $file_name)."',\n";
  33           }
  34           $script .= ");\n";
  35           echo "<pre>";
  36           echo $script;
  37           echo "</pre>";
  38   }
  39  
  40   ?>