Jer*_*mie 12 apache if-statement httpd.conf
我想在Apache 2.4的httpd.conf中测试一个文件的存在.
我使用这样的标签:
<If "%{DocumentRoot}/maintenance.enable -f">
...code to execute ...
</If>
但我的代码不好,apache的服务不想启动.我在很多网站上阅读了很多教程或文档,但从未找到答案:(
请帮我 ...
对于 Apache 2.4.34 及更高版本,可以使用的替代指令是<IfFile>。
在这种情况下,语法是:
<IfFile %{DOCUMENT_ROOT} . '/maintenance.enable'>
... code to execute ...
</IfFile>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6736 次 |
最近记录: |