在 PHP 中使用 YAML (Ubuntu)

相比 XML 和 Json 而言,YAML 是面向人类阅读和书写方便的标记语言。官网: http://www.yaml.org/

  1. 先安装 re2c。从 http://sourceforge.net/projects/re2c/ 下载一个 re2c 的最新版本(.tar.gz) 解包,configure,再 sudo make install。
  2. sudo apt-get install libyaml-dev
  3. sudo pecl install yaml-beta
  4. 编辑 php.ini 加入 "extension=yaml.so"
  5. 用这个命令可检测 yaml 是否已经可用: php --re yaml
Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License