PHP:如何检查是否已正确安装并启用了库?

编程入门 行业动态 更新时间:2024-10-24 02:25:39
本文介绍了PHP:如何检查是否已正确安装并启用了库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在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:如何检查是否已正确安装并启用了库?

本文发布于:2023-11-01 01:21:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547833.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确   PHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!