Zend 服务器版本?

发布于 2024-08-20 07:13:55 字数 197 浏览 3 评论 0原文

如何通过在此 Zend Server 上运行的 PHP 脚本接收 Zend Server 版本?

phpinfo() 和命令行 php -v 不会告诉 Zend Server 版本!

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

phpinfo() and the commandline php -v does not tell the Zend Server version!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

檐上三寸雪 2024-08-27 07:13:55

您无法从 phpinfo (或相关环境)获取服务器版本。

我假设您正在查看服务器控制 GUI 中显示的值 Monitor |服务器信息,例如版本版本。它们存储在 $InstallDir/GUI/application/data/zend-server.ini 中。您的应用程序必须能够访问 Ini 所在的文件夹,加载 Ini 文件(使用类似 Zend_Config 的文件),然后您就可以使用这些值。

请注意,ZS 是使用 ZF 构建的,并且文件没有混淆,因此您可以查看它们的源代码以了解它们如何访问此信息。很可能重用他们的一些代码。

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.

万劫不复 2024-08-27 07:13:55

一种快速但肮脏的获取方式:

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

在这里,您可以将 /usr/local/zend 替换为您可能选择的任何替代路径。

你会得到一些输出,例如:

version = 5.6.0

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
半窗疏影 2024-08-27 07:13:55

您可以使用以下命令:
回声 Zend_Version::VERSION;

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

情话已封尘 2024-08-27 07:13:55

打开 zend 服务器 .ini 文件 (zs_ui.ini) 并找到 version

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

示例:
zend_gui.version = 9.0.1

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文