【发布时间】:2023-04-03 11:45:02
【问题描述】:
您能否告诉我如何正确编写此 php 代码:
if (function_exists('apache_get_modules')) {
apache_get_modules()
and other related code
}
else {
no support for apache modules, maybe phpinfo show some related info
}
谢谢
【问题讨论】:
-
代码的作用是什么?
-
查看apache_get_modules()函数是否存在,如果不存在则写“不支持apache模块”
-
function_exists('apache_get_modules') ? apache_get_modules() : print('no support for apache modules');:P