源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

THINKPHP支持YAML配置文件的设置方法

  • 时间:2022-09-23 21:08 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:THINKPHP支持YAML配置文件的设置方法
[b]为什么要用 yaml[/b] 因为 Yaml 简单,而且对人类友好; Yaml: [url=http://www.yaml.org/]http://www.yaml.org/[/url] [b]在哪里会用到?[/b] 最基本的,在 ThinkPHP 的配置文件里面就可以选择 Yaml 的格式,你是愿意写 Yaml 的简洁格式配置呢?还是愿意写又长又臭又难写的 PHP array 呢? [url=http://document.thinkphp.cn/manual_3_2.html#config_format]http://document.thinkphp.cn/manual_3_2.html#config_format[/url] [b]问题来了[/b] 于是,我把配置格式改为 Yaml:
[url=https://github.com/mustangostang/spyc/]https://github.com/mustangostang/spyc/[/url] 然后,这个 vendor 是什么东东? 看这里:[url=http://document.thinkphp.cn/manual_3_2.html#autoload]http://document.thinkphp.cn/manual_3_2.html#autoload[/url] [b]结论:[/b] 在上面的 Git 里面下载 Spyc.php 放进 /ThinkPHP/Library/Vendor/spyc/ 目录下,就一切正常!Done with the right way!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部