當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DevblocksPlatform::start_memory方法代碼示例

本文整理匯總了PHP中DevblocksPlatform::start_memory方法的典型用法代碼示例。如果您正苦於以下問題:PHP DevblocksPlatform::start_memory方法的具體用法?PHP DevblocksPlatform::start_memory怎麽用?PHP DevblocksPlatform::start_memory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DevblocksPlatform的用法示例。


在下文中一共展示了DevblocksPlatform::start_memory方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 /**
  * Initializes the plugin platform (paths, etc).
  *
  * @static 
  * @return void
  */
 static function init()
 {
     self::$start_time = microtime(true);
     if (function_exists('memory_get_usage') && function_exists('memory_get_peak_usage')) {
         self::$start_memory = memory_get_usage();
         self::$start_peak_memory = memory_get_peak_usage();
     }
     // [JAS]: [TODO] Do we need an explicit init() call?
     // [JAS] [MDF]: Automatically determine the relative webpath to Devblocks files
     if (!defined('DEVBLOCKS_WEBPATH')) {
         $php_self = $_SERVER["PHP_SELF"];
         @($proxyhost = $_SERVER['HTTP_DEVBLOCKSPROXYHOST']);
         @($proxybase = $_SERVER['HTTP_DEVBLOCKSPROXYBASE']);
         if (!empty($proxybase)) {
             $php_self = $proxybase . '/';
         } elseif (DEVBLOCKS_REWRITE) {
             $pos = strrpos($php_self, '/');
             $php_self = substr($php_self, 0, $pos) . '/';
         } else {
             $pos = strrpos($php_self, 'index.php');
             if (false === $pos) {
                 $pos = strrpos($php_self, 'ajax.php');
             }
             $php_self = substr($php_self, 0, $pos);
         }
         @define('DEVBLOCKS_WEBPATH', $php_self);
     }
 }
開發者ID:sluther,項目名稱:portsensor,代碼行數:34,代碼來源:Devblocks.class.php

示例2: init

 /**
  * Initializes the plugin platform (paths, etc).
  *
  * @static 
  * @return void
  */
 static function init()
 {
     self::$start_time = microtime(true);
     if (function_exists('memory_get_usage') && function_exists('memory_get_peak_usage')) {
         self::$start_memory = memory_get_usage();
         self::$start_peak_memory = memory_get_peak_usage();
     }
     // Encoding (mbstring)
     mb_internal_encoding(LANG_CHARSET_CODE);
     // [JAS] [MDF]: Automatically determine the relative webpath to Devblocks files
     @($proxyhost = $_SERVER['HTTP_DEVBLOCKSPROXYHOST']);
     @($proxybase = $_SERVER['HTTP_DEVBLOCKSPROXYBASE']);
     // App path (always backend)
     $app_self = $_SERVER["SCRIPT_NAME"];
     if (DEVBLOCKS_REWRITE) {
         $pos = strrpos($app_self, '/');
         $app_self = substr($app_self, 0, $pos) . '/';
     } else {
         $pos = strrpos($app_self, 'index.php');
         if (false === $pos) {
             $pos = strrpos($app_self, 'ajax.php');
         }
         $app_self = substr($app_self, 0, $pos);
     }
     // Context path (abstracted: proxies or backend)
     if (!empty($proxybase)) {
         // proxy
         $context_self = $proxybase . '/';
     } else {
         // non-proxy
         $context_self = $app_self;
     }
     @define('DEVBLOCKS_WEBPATH', $context_self);
     @define('DEVBLOCKS_APP_WEBPATH', $app_self);
     // Register shutdown function
     register_shutdown_function(array('DevblocksPlatform', 'shutdown'));
 }
開發者ID:jstanden,項目名稱:devblocks,代碼行數:43,代碼來源:Devblocks.class.php


注:本文中的DevblocksPlatform::start_memory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。