Пример #1
0
 public static function info($info = '', $hashkey = '', $type = 'info')
 {
     if ($info == '') {
         return false;
     }
     $execTime = self::getFomatTime();
     $time = self::getTime();
     $newHashkey = md5($time . $info);
     if ($hashkey != '' && isset(self::$hashkeyTimeline[$hashkey])) {
         $execTime = self::getFomatTime(self::$hashkeyTimeline[$hashkey], $time);
     } else {
         self::$hashkeyTimeline[$newHashkey] = $time;
     }
     $debugInfo = array('info' => $info, 'time' => $execTime, 'memory' => self::getSizeUsage(memory_get_usage()));
     if (strpos(PHP_SAPI, 'cli') === true) {
         if (core::getConfig('core_debug') == true) {
             echo $debugInfo['info'] . ' (Time: ' . $debugInfo['time'] . ' , Memory: ' . $debugInfo['memory'] . ")\n";
         }
     } else {
         if ($type == 'info') {
             self::$info[$newHashkey] = $debugInfo;
         }
     }
     return $newHashkey;
 }
Пример #2
0
 private function __setdefine()
 {
     define('STATIC_DIR', core::getConfig('web_dir') . '/static');
     $this->assign('STATIC_DIR', STATIC_DIR);
     $this->assign('_GET', $this->get);
     $this->assign('_POST', $this->post);
 }
Пример #3
0
 /**
  * 构造函数
  *
  * @return void
  */
 public function __construct()
 {
     if (!$this->dbConfig) {
         $this->dbConfig = core::getConfig('db_config');
     }
     $this->adapter = core_database_factory::getInstance('pdo', $this->dbConfig);
     $this->cache = core_cache_factory::getInstance('filesystem');
 }
Пример #4
0
 public function getRender()
 {
     $render = core::instance('core_template');
     $render->template_dir = core::getConfig('template_dir');
     $render->compile_dir = core::getConfig('compile_dir');
     $render->tpl_left_delim = core::getConfig('tpl_left_delim');
     $render->tpl_right_delim = core::getConfig('tpl_right_delim');
     return $render;
 }
Пример #5
0
 public function __construct($params = array())
 {
     if (!isset($params['cache_dir']) || !$this->getInstance()->isDir($params['cache_dir'])) {
         $this->savepath = core::getConfig('cache_filesystem_dir');
     } else {
         $this->savepath = $params['cache_dir'];
     }
     core_debug::info('set filesystem dir: ' . $this->getSavePath());
 }
Created on: 2016-01-27 13:56:50 
*/
$this->checkCompile('index.html', 'd1c750356963cfc3405c170e6d3fb335', '1453874210');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="<?php 
echo core::getConfig('app_dir');
?>
/data/static/default/css/style.css">
<script src="<?php 
echo core::getConfig('app_dir');
?>
/data/static/default/js/jquery-1.9.1.js"></script>
</head>

<body>

<table cellpadding="0" cellspacing="0" class="table-list" style='width:100%;'>
<thead>
<tr>
<th>ID</th>
<th>脚本名称</th>
<th>状态</th>
<th>下次运行时间</th>
</tr>
</thead>
Пример #7
0
 public function __construct()
 {
     $this->render = core::instance('core_page')->getRender();
     $this->render->template_dir = core::getConfig('widget_dir');
     $this->render->mark = 'widget';
 }