如何实现centos环境中的PHP JSON安装_PHP教程

WBOY
Freigeben: 2016-07-15 13:32:56
Original
1281 Leute haben es durchsucht

1.下载源文件包:

wget http://www.aurore.net/projects/php-json/

2.解压

tar xvjf php-json-ext-1.2.0.tar.bz2

3.进入目录

cd php-json-ext-1.2.0

4.初始化PHP环境

phpize

报错了:phpize commend not found

PHP JSON安装之前需要安装phpize
这个可以在yum中安装
yum -y install php-devel

如果还不能完成PHP JSON安装,说明你的编译工具有问题,安装一下就可以了
yum -y install autoconf
yum -y install automake
yum -y install libtool

运行phpize
(成功了)

5../configure

6.make

7.makeinstall

8.查看PHP JSON安装有没有成功

find / -name '*json.so'

./usr/lib/php/modules/json.so
说明已经有了

9.修改php.ini

我的是在php.ini 中include一个文件夹 /etc/php.d

在这个文件中添一个json.ini
vim json.ini

内容如下:
extension=json.so

10.重启服务

11.phpinfo()中您将看到

json support enabled
json version

以上就是PHP JSON安装的全部步骤。


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/446099.htmlTechArticle1.下载源文件包: wget http://www.aurore.net/projects/php-json/ 2.解压 tar xvjf php-json-ext-1.2.0.tar.bz2 3.进入目录 cd php-json-ext-1.2.0 4.初始化PHP环境 phpize 报...
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!