当前位置: 首页>>代码示例>>PHP>>正文


PHP DevblocksPlatform::start_time方法代码示例

本文整理汇总了PHP中DevblocksPlatform::start_time方法的典型用法代码示例。如果您正苦于以下问题:PHP DevblocksPlatform::start_time方法的具体用法?PHP DevblocksPlatform::start_time怎么用?PHP DevblocksPlatform::start_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevblocksPlatform的用法示例。


在下文中一共展示了DevblocksPlatform::start_time方法的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_time方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。