开发者

How can I check PHP version if phpinfo() is disabled?

开发者 https://www.devze.com 2023-01-14 06:11 出处:网络
What are some workarounds for checking what version of PHP开发者_JS百科 when phpinfo() is disabled?

What are some workarounds for checking what version of PHP开发者_JS百科 when phpinfo() is disabled?


  • phpversion() will return a full version string.

  • The PHP_VERSION constant also contains the version information.

  • Since PHP 5.2.7, there are also constants containing "sub-info" like PHP_MAJOR_VERSION, PHP_MINOR_VERSION....


You can check the PHP_VERSION constant (this is a string) or PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION for their respective integer values.


You could use softPhpInfo() instead which prints also other useful configuration infos. It's an alternative to PHP's built-in phpinfo().

0

精彩评论

暂无评论...
验证码 换一张
取 消