简体   繁体   English

如何检查是否使用PHP激活mod_security(没有卷曲)

[英]How to check if mod_security is activated with PHP (without curl)

Is there a way to know if mod_security is activated on an apache server using PHP? 有没有办法知道使用PHP在apache服务器上是否激活了mod_security? (without curl) (没有卷曲)

One thing you could try is using apache_get_modules to discover what modules Apache currently has enabled. 您可以尝试的一件事是使用apache_get_modules来发现Apache当前启用的模块。 Of course this approach will only work on an Apache server and not on other popular HTTP servers. 当然,这种方法只能在Apache服务器上运行,而不能在其他流行的HTTP服务器上运行。

var_dump (in_array ('mod_security', apache_get_modules ()));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM