• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CI_Config类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了CI_Config类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getConfigArray

 /**
  * Returns configuration array for given config file.
  * 
  * @param string $config name of config file without extension.
  * @return array<mixed> values of config file.
  */
 public function getConfigArray($config)
 {
     if (file_exists(APPPATH . 'config/' . $config . '.php')) {
         $configObject = new CI_Config();
         $configObject->load($config, TRUE);
         return $configObject->config[$config];
     }
     return NULL;
 }
开发者ID:andrejjursa,项目名称:fmfi-tis,代码行数:15,代码来源:configurator.php


示例2: show_php_error

 /**
  * Native PHP error handler
  *
  * @param	string	$severity	the error severity
  * @param	string	$message	the error string
  * @param	string	$filepath	the error filepath
  * @param	string	$line		the error line number
  */
 function show_php_error($severity, $message, $filepath, $line)
 {
     $severity = !isset($this->levels[$severity]) ? $severity : $this->levels[$severity];
     $filepath = str_replace("\\", "/", $filepath);
     /**
      * For safety reasons we do not show the full file path
      */
     if (FALSE !== strpos($filepath, '/')) {
         $x = explode('/', $filepath);
         $filepath = $x[count($x) - 2] . '/' . end($x);
     }
     if (ob_get_level() > $this->ob_level + 1) {
         ob_end_flush();
     }
     include_once BASEPATH . 'core/Config' . EXT;
     $config = new CI_Config();
     ob_start();
     include APPPATH . 'views/themes/' . $config->item('theme') . '/errors/error_php' . EXT;
     $buffer = ob_get_contents();
     ob_end_clean();
     echo $buffer;
 }
开发者ID:naterkane,项目名称:local.to,代码行数:30,代码来源:App_Exceptions.php


示例3: __construct

     }
 }
 public function __construct()
 {
     $config = new CI_Config();
     $this->app_code = $config->item('app_code');
     $this->client_code = $config->item('client_code');
     $this->target = $config->item('target_core');
     $api = array('tes' => 'ksc/pasien/generate', 'doctype' => 'ksc/doctortypes/index', 'doctypePasien' => 'ksc/doctortypes/pasienlist', 'pasienDetail' => 'ksc/pasien/detail', 'pasienSaveMedrec' => 'ksc/pasien/savemedrec', 'logDaftar' => 'ksc/daftar/logs');
开发者ID:nmadipati,项目名称:si-ksc,代码行数:9,代码来源:core_model.php


示例4: MY_Config

 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 function MY_Config()
 {
     parent::CI_Config();
 }
开发者ID:grimsmath,项目名称:lavillafdn,代码行数:10,代码来源:MY_Config.php


示例5: define

 | always be used to set the mode correctly.
 |
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);
/*
 |--------------------------------------------------------------------------
 | File Stream Modes
 |--------------------------------------------------------------------------
 |
 | These modes are used when working with fopen()/popen()
 |
*/
define('FOPEN_READ', 'rb');
define('FOPEN_READ_WRITE', 'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb');
// truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b');
// truncates existing file data, use with care
define('FOPEN_WRITE_CREATE', 'ab');
define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
require FCPATH . "system/core/Config.php";
$url = new CI_Config();
define("BASEURL", $url->base_url());
define("SITEURL", $url->site_url());
/* End of file constants.php */
/* Location: ./application/config/constants.php */
开发者ID:pravinhirmukhe,项目名称:punelic,代码行数:31,代码来源:constants.php


示例6:

 /**
  * Constructor
  *
  * @access  public
  * @return  void
  */
 function __construct()
 {
     parent::__construct();
     $this->config_path = APPPATH . 'config/config' . EXT;
     $this->database_path = APPPATH . 'config/database' . EXT;
     $this->autoload_path = APPPATH . 'config/autoload' . EXT;
 }
开发者ID:denzilferreira,项目名称:aware-server,代码行数:13,代码来源:MY_config.php


示例7: load

 public function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
 {
     // first we need to check if this is called before CI_controller
     // if yes, well just use default
     if (!class_exists('CI_controller')) {
         return parent::load($file, $use_sections, $fail_gracefully);
     }
     if (in_array($file, $this->is_loaded, TRUE)) {
         return $this->item($file);
     }
     $_module = Modules::$current;
     if ($path = modules::find($file, $_module, 'config')) {
         // this file expected contain $config var
         include $path;
         if (!isset($config) or !is_array($config)) {
             show_error("{$path} does not contain a valid config array");
         }
         log_message('debug', "File loaded: {$path}");
         $current_config =& $this->config;
         if ($use_sections === TRUE) {
             if (isset($current_config[$file])) {
                 $current_config[$file] = array_merge($current_config[$file], $config);
             } else {
                 $current_config[$file] = $config;
             }
         } else {
             $current_config = array_merge($current_config, $config);
         }
         $this->is_loaded[] = $file;
         unset($config);
         return $this->item($file);
     }
     return parent::load($file, $use_sections, $fail_gracefully);
 }
开发者ID:egig,项目名称:CodeIgniter-HMVC-Support,代码行数:34,代码来源:Config.php


示例8: load

 public function load($file = 'config', $use_sections = FALSE, $fail_gracefully = FALSE, $_module = '')
 {
     if (in_array($file, $this->is_loaded, TRUE)) {
         return $this->item($file);
     }
     $_module or $_module = CI::$APP->router->fetch_module();
     list($path, $file) = Modules::find($file, $_module, 'config/');
     if ($path === FALSE) {
         parent::load($file, $use_sections, $fail_gracefully);
         return $this->item($file);
     }
     if ($config = Modules::load_file($file, $path, 'config')) {
         /* reference to the config array */
         $current_config =& $this->config;
         if ($use_sections === TRUE) {
             if (isset($current_config[$file])) {
                 $current_config[$file] = array_merge($current_config[$file], $config);
             } else {
                 $current_config[$file] = $config;
             }
         } else {
             $current_config = array_merge($current_config, $config);
         }
         $this->is_loaded[] = $file;
         unset($config);
         return $this->item($file);
     }
 }
开发者ID:pay-test,项目名称:ci2,代码行数:28,代码来源:Config.php


示例9: __construct

 /**
  * Constructor
  *
  */
 public function __construct()
 {
     parent::__construct();
     // Change this path before release.
     $this->config_path = APPPATH . 'config/config' . EXT;
     $this->database_path = APPPATH . 'config/database' . EXT;
     $this->_initialize();
 }
开发者ID:rmdort,项目名称:adiee,代码行数:12,代码来源:EE_Config.php


示例10: load

 /**
  * Load a config file - Overrides built-in CodeIgniter config file loader
  *
  * @param string $file
  * @param boolean $use_sections
  * @param boolean $fail_gracefully
  */
 function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
 {
     parent::load($file, $use_sections, $fail_gracefully);
     //Local settings override permanent settings always.
     if (is_readable(FCPATH . 'config.local.php')) {
         parent::load('config.local.php', $use_sections, $fail_gracefully);
     }
 }
开发者ID:rcdelacruz,项目名称:globe-mds-touch,代码行数:15,代码来源:MY_Config.php


示例11:

 function base_url($uri = '')
 {
     $url = parent::base_url($uri);
     if ($_SERVER['SERVER_PORT'] == 443) {
         $url = str_replace('http://', 'https://', $url);
     }
     return $url;
 }
开发者ID:hqlulu,项目名称:startbbs,代码行数:8,代码来源:MY_Config.php


示例12: implode

 function site_url($uri = '')
 {
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (class_exists('CI_Controller')) {
         $uri = get_instance()->lang->localized($uri);
     }
     return parent::site_url($uri);
 }
开发者ID:Razican,项目名称:MegaPublik,代码行数:10,代码来源:MP_Config.php


示例13: site_url

 public function site_url($uri = '', $protocol = NULL)
 {
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (function_exists('get_instance')) {
         $uri = get_instance()->lang->localized($uri);
     }
     return parent::site_url($uri, $protocol);
 }
开发者ID:orcun-yuksel,项目名称:DMC,代码行数:10,代码来源:MY_Config.php


示例14: item

 public function item($item, $index = '')
 {
     $config = parent::item($item, $index);
     if ($config === NULL) {
         if (class_exists('CI_Controller')) {
             return $this->_database_config($item, $index);
         }
     }
     return $config;
 }
开发者ID:barayuda,项目名称:k-starter,代码行数:10,代码来源:MY_Config.php


示例15: implode

 function site_url($uri = '', $protocol = NULL)
 {
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (class_exists('CI_Controller')) {
         $CI =& get_instance();
         $uri = $CI->lang->localized($uri);
     }
     return parent::site_url($uri);
 }
开发者ID:sidecia,项目名称:wiyoitrip,代码行数:11,代码来源:MY_Config.php


示例16: site_url

 /**
  * @param string $uri
  * @param null $protocol
  * @return string
  */
 public function site_url($uri = '', $protocol = NULL)
 {
     global $LANG;
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (class_exists('CI_Controller')) {
         $uri = $LANG->localized($uri);
     }
     return parent::site_url($uri);
 }
开发者ID:lalcebo,项目名称:codeigniter-skeleton,代码行数:16,代码来源:MY_Config.php


示例17: implode

 function site_url($uri = '')
 {
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (function_exists('get_instance')) {
         $CI =& get_instance();
         $uri = $CI->lang->localized($uri);
     }
     return parent::site_url($uri);
 }
开发者ID:pjmoore92,项目名称:teamo-webtranslator,代码行数:11,代码来源:MY_Config.php


示例18: site_url

 /**
  * Site URL
  * Returns base_url . index_page [. uri_string]
  *
  * @param	mixed	the URI string or an array of segments
  * @return	string
  */
 public function site_url($uri = '')
 {
     //get ci instance
     $ci = get_instance();
     //check whether sef service is installed
     if ($ci->service->is_installed('sef')) {
         //get service
         $sef = $ci->service->get_service('sef');
         //process the search friendly url
         return $sef->site_url($uri);
     } else {
         return parent::site_url($uri);
     }
 }
开发者ID:colonia,项目名称:tomatocart-v2,代码行数:21,代码来源:TOC_Config.php


示例19: implode

 function site_url($uri = '')
 {
     if (is_array($uri)) {
         $uri = implode('/', $uri);
     }
     if (class_exists('CI_Controller')) {
         $CI =& get_instance();
         //echo parent::site_url(); exit;
         //--------------------if($CI->config->item('language') == 'english') return parent::site_url($uri);
         $uri = $CI->lang->localized($uri);
         //echo $uri; exit;
     }
     //echo $uri; exit;
     $site_url = parent::site_url($uri);
     $site_url = rtrim($site_url, '/');
     $site_url .= "/";
     return $site_url;
 }
开发者ID:ponchov,项目名称:quizzworld,代码行数:18,代码来源:MY_Config.php


示例20: load

 public function load($file = 'config', $use_sections = FALSE, $fail_gracefully = FALSE, $_module = '')
 {
     //if (in_array($file, $this->is_loaded, TRUE)) return $this->item($file);
     //echo "Модуль до определения = $_module<br>";
     if ($_module === false) {
         $_module = '';
     } else {
         $_module or $_module = CI::$APP->router->fetch_module();
     }
     //echo "Модуль после определения = $_module<br>";
     list($path, $file) = Modules::find($file, $_module, 'config/');
     if ($path === FALSE) {
         parent::load($file, $use_sections, $fail_gracefully);
         return $this->item($file);
     }
     //echo "Путь - $path, файл-$file<br>";
     // добавлено для корректной работы уже загруженных файлов модулей
     $file_path = $path . $file . EXT;
     //echo "Данные $file_path:<br>";
     //print_r($this->item($file_path));
     //if (in_array($file_path, $this->is_loaded, TRUE)) return $this->item($file);
     // конец добавления
     if ($config = Modules::load_file($file, $path, 'config')) {
         /* reference to the config array */
         $current_config =& $this->config;
         if ($use_sections === TRUE) {
             if (isset($current_config[$file])) {
                 //$current_config[$file] = array_merge($current_config[$file], $config);
                 $current_config[$file] = $this->array_merge_recursive_distinct($current_config[$file], $config);
             } else {
                 $current_config[$file] = $config;
             }
         } else {
             $current_config = array_merge($current_config, $config);
         }
         //$this->is_loaded[] = $file;
         // исправлено на:
         $this->is_loaded[] = $file_path;
         unset($config);
         return $this->item($file);
     }
 }
开发者ID:Moro3,项目名称:duc,代码行数:42,代码来源:Config.php



注:本文中的CI_Config类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CI_Controller类代码示例发布时间:2022-05-23
下一篇:
PHP CI_Base类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap