PHP zip扩展Linux下安装过程分享
编程学习 2021-07-05 09:49www.dzhlxh.cn编程入门
这篇文章主要介绍了PHP zip扩展Linux下安装过程分享,需要的朋友可以参考下
1.依次运行以下命令
代码如下:
wget http://pecl.php.net/get/zip-1.8.10.tgz
#tar zxvf zip-1.8.3.tgz
#cd zip-1.8.3
#/opt/php/bin/phpize (对应的phpize路径)http://yige.org/
#./configure --with-php-config=/opt/php/bin/php-config (对应的php-config路径)
#make
#make install
#tar zxvf zip-1.8.3.tgz
#cd zip-1.8.3
#/opt/php/bin/phpize (对应的phpize路径)http://yige.org/
#./configure --with-php-config=/opt/php/bin/php-config (对应的php-config路径)
#make
#make install
2.生成的模块路径
代码如下:
/opt/php/lib/php/extensions/no-debug-non-zts-20050922/zip.so
3.修改php.ini
代码如下:
extension_dir = "./"
;修改为
extension_dir = "/opt/php/lib/php/extensions/no-debug-non-zts-20050922/"
;增加
extension="zip.so"
4.重启apache或php-cgi
上一篇:php生成短网址示例
下一篇:PHP常用的缓存技术汇总