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


PHP core::getConfig方法代碼示例

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


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

示例1: info

 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;
 }
開發者ID:Junec,項目名稱:core,代碼行數:25,代碼來源:debug.php

示例2: __setdefine

 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);
 }
開發者ID:Junec,項目名稱:admin,代碼行數:7,代碼來源:controller.php

示例3: __construct

 /**
  * 構造函數
  *
  * @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');
 }
開發者ID:Junec,項目名稱:core,代碼行數:13,代碼來源:model.php

示例4: getRender

 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;
 }
開發者ID:Junec,項目名稱:core,代碼行數:9,代碼來源:page.php

示例5: __construct

 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());
 }
開發者ID:Junec,項目名稱:core,代碼行數:9,代碼來源:filesystem.php

示例6:

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>
開發者ID:Junec,項目名稱:crontabs,代碼行數:31,代碼來源:index_html_template_complie.php

示例7: __construct

 public function __construct()
 {
     $this->render = core::instance('core_page')->getRender();
     $this->render->template_dir = core::getConfig('widget_dir');
     $this->render->mark = 'widget';
 }
開發者ID:Junec,項目名稱:core,代碼行數:6,代碼來源:widget.php


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