学习ThinkPHP3.2.2:video9,用“C”函数读取配置文件内容
在配置文件 D:wampwwwwishAPPHomeConfconfig.php 中配置一下内容:
return array(
//"配置项"=>"配置值"
"myvar" => "valueofaaa1"
);
在控制器 D:wampwwwwishAPPHomeControllerIndexController.class.php 修改index方法:
echo C("myvar");
浏览主页:http://localhost/wish/index.php
显示:valueofaaa1
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。