Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
use Think\Controller;
|
||||
class ConfigController extends AdminController{
|
||||
public function index(){
|
||||
if(IS_POST){
|
||||
$conarr=C("LOAD_EXT_CONFIG");
|
||||
foreach($conarr as $conf){
|
||||
$settingstr="<?php \n return ".var_export($_POST[$conf],true).";";//配置文件str
|
||||
$setting_path=APP_PATH."Common/Conf/".$conf.".php";//配置文件路径
|
||||
file_put_contents($setting_path,$settingstr);//保存到配置文件里
|
||||
}
|
||||
//
|
||||
D("UserLog")->add("update","网站设置","-");
|
||||
$this->success("保存成功",U("index"));
|
||||
}
|
||||
$this->display();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user