PHP获取文件参数
Tp5
thinkphp5
1、在application/extra文件夹下新建site.php
2、配置
3、获取参数<?php
return array (
'name' => '原克技术',
'beian' => '',
'cdnurl' => '',
'version' => '2.0.9',
'timezone' => 'Asia/Shanghai',
'forbiddenip' => '',
'languages' =>
array (
'backend' => 'zh-cn',
'frontend' => 'zh-cn',
),
'fixedpage' => 'dashboard',
'categorytype' =>
array (
'default' => 'Default',
'page' => 'Page',
'article' => 'Article',
'test' => 'Test',
),
'configgroup' =>
array (
'basic' => 'Basic',
'email' => 'Email',
'dictionary' => 'Dictionary',
'user' => 'User',
'example' => 'Example',
),
'mail_type' => '1',
'mail_smtp_host' => 'smtp.qq.com',
'mail_smtp_port' => '465',
'mail_smtp_user' => '10000',
'mail_smtp_pass' => 'password',
'mail_verify_type' => '2',
'mail_from' => '10000@qq.com',
'attachmentcategory' =>
array (
'category1' => 'Category1',
'category2' => 'Category2',
'custom' => 'Custom',
),
'sensitive_is' => '0',
'SecretID' => '111',
'SecretKey' => '222',
'numbers' => '2',
);
Config::get('site.sensitive_is')
获取参数前需要引入Config类
use think\Config;