This time to everyone to bring PHP installation zip extension and libzip steps in detail, PHP installation zip extension and libzip note what, the following is the actual case, take a look.
Linux:
PHP to call the \ziparchive class, you need to install a zip extension library, and zip expansion library needs to install Libzip first.
We first download:
wget Http://pecl.php.net/get/zip
Download the zip, then tar-zvxf zip, get the extracted zip-1.14.0
CD zip-1.14.0
Phpize
And then./configure to see if Libzip is missing?
If it is missing, first install Libzip,wget https://nih.at/libzip/libzip-1.2.0.tar.gz
TAR-ZXVF libzip-1.2.0.tar.gz
CD libzip-1.2.0
./configure
Make
Make install
After the installation is complete, you can install the zip. If you can't find ' zipconf.h ', look for it, you can actually find it.
Find/usr/local-iname ' zipconf.h '
But why can't you find it? OK
Ln-s/usr/local/lib/libzip/include/zipconf.h/usr/local/include. This allows you to install the zip.
Modify PHP.ini, you can call Phpinfo () to see php.ini in that path
Extension_dir = "./"
Modified to Extension_dir = "/var/zip-1.14.0/modules"
Add extension= "zip.so"
Restart Apache,httpd-k restart
Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!
Recommended reading:
thinkphp Framework User Information Query update and delete steps
PHP7.1 Internal Installation Yaf extension steps detailed