Enable json_encode in PHP(在 PHP 中启用 json_encode)
问题描述
有人可以建议如何在 PHP 中启用 json_encode 函数吗?
Could someone advise on how to enable the json_encode function in PHP?
我已经全新安装了 Centos 5.6,并且刚刚安装了 Virtualmin.
I have a clean install of Centos 5.6 and have just installed Virtualmin.
有人知道接下来要采取的步骤吗?
Does anyone know the next steps to take?
推荐答案
如 http://www.php.net/manual/en/json.requirements.php
要求
使用这些功能无需安装;它们是 PHP 核心的一部分.
There is no installation needed to use these functions; they are part of the PHP core.
只需 PHP >= 5.2.0
编辑:在评论中看到 还有这个
在 RHEL5/CentOS5 上添加 EPEL 存储库(http://fedoraproject.org/wiki/EPEL).
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
不知道这是否适用于你的问题,我没有 Centos 服务器...
Don't know if this apply for your question, I don't have a Centos server...
对于 Ubuntu:
sudo aptitude install php5-json
这篇关于在 PHP 中启用 json_encode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 PHP 中启用 json_encode


基础教程推荐
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01