在SO上遵循另一个问题(我不是PHP专家),我想知道本地笔记本电脑上是否已正确安装Zlib库.文档说不需要手动安装该库,但是使用该库的代码不起作用.
Following another question on SO (I am no PHP expert), I am wondering whether the Zlib library has been properly installed on my local laptop. Documentation says there should be no need to manually install this library, but code using this library does not work.
文档提到需要配置PHP --with-zlib[=DIR],但适用于4.3以下的版本.我在5.2.17.我已经检查了php.ini,但是看不到对此的引用.我的PHP系统已安装 Acquia Dev Desktop .
Documentation mentions a need to configure PHP --with-zlib[=DIR], but for versions below 4.3. I am on 5.2.17. I have checked php.ini, but I see no reference to it. My PHP system has been installed with Acquia Dev Desktop.
如何检查Zlib库是否已在本地PC上正确安装并启用?我应该去哪里看看?我应该找什么?谢谢.
How can I check whether the Zlib library has been properly installed and enabled on my local PC? Where should I take a look at? What should I look for? Thanks.
推荐答案您可以使用phpinfo()获取有关库的完整信息
You can use phpinfo() to get full information about libraries
<?php phpinfo(); ?>或在您的PHP代码中测试给定功能
or in your PHP code test for a given function
if (function_exists("gzcompress")) { echo "OK"; } else { die("zlib missing"); }更多推荐
PHP:如何检查是否已正确安装并启用了库?
发布评论