how to enable .zip extension in server

I want to enable the .zip extension in my server. I added the below code in a php.ini file. But the website will take the default php.ini file.

extension=php_zip.dll
extension=zip.so

If I upload it in to the root directory of my website. Is there any way to take the uploaded php.ini instead of default php.ini ??

Or is there any other way ( .htaccess ) to enable .zip extension in the server??


If I upload it [the php.ini file] in to the root directory of my website. Is there any way to take the uploaded php.ini instead of default php.ini ?

You need to contact your hoster which options it offers. By default just uploading a (php.ini) file will place that file in your webroot so it can be downloaded by visitors but it has not influence on your PHP configuration.

Or is there any other way ( .htaccess ) to enable .zip extension in the server?

No, per .htaccess there is no way to enable the .zip extension. The extension PHP ini-directive is for php.ini only.

You need to contact your hoster and discuss the issue, many hosters offer to install extensions for you and also they offer some mechanism to allow you to specify your own php.ini but how that is done depends on the hoster.

链接地址: http://www.djcxy.com/p/71126.html

上一篇: Laravel需要Mcrypt PHP扩展

下一篇: 如何在服务器中启用.zip扩展