系统自动在Application文件夹下生成的config.php文件,采用key-value关联数组的形式来存放配置项和值.为了使结构更清晰,手动新建另外一个配置文件myconfig.php,所采用的形式亦为关联数组,

$config['mod'] = array(
'api' => 'https://webapi.sms.mob.com/sms/verify',
'appkey' =>'',
);

读取方式:

$this->config->load('myconfig');
$dat = $this->config->item('mod');
print_r($dat);

相关文章:

  • 2021-11-30
  • 2021-07-04
  • 2021-06-27
  • 2021-11-23
  • 2021-07-31
  • 2022-12-23
  • 2021-09-15
  • 2021-06-06
猜你喜欢
  • 2022-01-12
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-09-07
相关资源
相似解决方案