开发者

Zend Server Version?

How can I receive the Zend Server version by a PHP script running on this Zend Server?

phpinfo() and the co开发者_StackOverflowmmandline php -v does not tell the Zend Server version!


You cannot derive the Server version from phpinfo (or the environment for that matter).

I assume you are after the values that are displayed in the Server Control GUI at Monitor | Server Info, e.g. version and build. They are stored in in $InstallDir/GUI/application/data/zend-server.ini. Your application has to have access to the folder where the Ini is located, load the Ini file (with something like Zend_Config) and then you can work with the values.

Note that ZS is build with ZF and the files are not obfuscated, so you can check out their source code to see how they access this information. Might very well be possible to reuse some of their code.


A quick and dirty way to get it:

$ cat /usr/local/zend/gui/application/data/zend-server.ini | grep version

Here you would replace /usr/local/zend with whatever alternative path you might have chosen.

And you'll get some output like:

version = 5.6.0


You can use the following command: echo Zend_Version::VERSION;


Open the zend server .ini file (zs_ui.ini) and find version.

...\Zend\ZendServer\gui\config\zs_ui.ini

Example: zend_gui.version = 9.0.1

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜