1   <?php
  2  
  3   $start = getmicrotime();
  4  
  5   define('ADMIN', 1);
  6   define('FULL_PATH', realpath(dirname(__FILE__).'/..') );
  7   if (!file_exists(FULL_PATH.'/core/kernel/application.php')) {
  8           die('Please re-checkout _inportal_kernel4 cvs module into the root directory ('.FULL_PATH.') and remove kernel/kernel4 folder. Make sure to checkout correct branch (RC or HEAD).');
  9   }
  10   include_once(FULL_PATH.'/core/kernel/startup.php');
  11  
  12   /*
  13           kApplication $application
  14   */
  15   $application =& kApplication::Instance();
  16   $application->Init();
  17   $application->Run();
  18   $application->Done();
  19  
  20   $end = getmicrotime();
  21  
  22   function getmicrotime()
  23   {
  24       list($usec, $sec) = explode(" ", microtime());
  25       return ((float)$usec + (float)$sec);
  26   }
  27  
  28   //update_memory_check_script();
  29  
  30   function update_memory_check_script() {
  31           $files = get_included_files();
  32           $script = '$files = Array('."\n";
  33           foreach ($files as $file_name) {
  34                   $script .= "\t\t'".str_replace(FULL_PATH, '', $file_name)."',\n";
  35           }
  36           $script .= ");\n";
  37           echo "<pre>";
  38           echo $script;
  39           echo "</pre>";
  40   }
  41  
  42   ?>