在PHP中启用json_encode [英] Enable json_encode in PHP
问题描述
有人建议如何在PHP中启用json_encode函数?
我已经安装了Centos 5.6,刚刚安装了Virtualmin。
$如 http://www.php.net/manual/en/json.requirements.php
需求
使用这些功能;它们是PHP核心的一部分。
只是 PHP> = 5.2.0
编辑:saw在评论中也提供此
在RHEL5 / CentOS5上添加EPEL存储库( http:// fedoraproject.org/wiki/EPEL )。
之后,安装过程非常简单:
sudo yum install php-pecl-json
b $ b
不知道这是否适用于您的问题,我没有Centos服务器...
对于Ubuntu:
sudo aptitude install php5-json
Could someone advise on how to enable the json_encode function in PHP?
I have a clean install of Centos 5.6 and have just installed Virtualmin.
Does anyone know the next steps to take?
As in http://www.php.net/manual/en/json.requirements.php
Requirements
There is no installation needed to use these functions; they are part of the PHP core.
Just PHP >= 5.2.0
Edit: saw in a comment also this
On RHEL5/CentOS5 add the EPEL repository (http://fedoraproject.org/wiki/EPEL).
After that, installation is as simple as:
sudo yum install php-pecl-json
Don't know if this apply for your question, I don't have a Centos server...
For Ubuntu:
sudo aptitude install php5-json
这篇关于在PHP中启用json_encode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!