PHP: How to check whether a library has been properly installed and enabled?

后端 未结 3 2008
南方客
南方客 2020-12-21 00:48

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 shoul

3条回答
  •  鱼传尺愫
    2020-12-21 01:36

    You can use phpinfo() to get full information about libraries

    
    

    or in your PHP code test for a given function

    if (function_exists("gzcompress")) {
      echo "OK";
    } else {
      die("zlib missing");
    }
    

提交回复
热议问题