gpt4 book ai didi

apache - 如何在 Apache 2.4 上测试带有 标签的文件是否存在?

转载 作者:行者123 更新时间:2023-12-04 00:47:00 25 4
gpt4 key购买 nike

我想在我的 Apache 2.4 的 httpd.conf 中测试文件的存在。

我使用这样的标签:
<If "%{DocumentRoot}/maintenance.enable -f">
...code to execute ...
</If>

但是我的代码不好,apache的服务不想启动。
我在许多网站上阅读了大量教程或文档,但从未找到答案:(

请帮我 ...

最佳答案

您应该阅读 Apache 错误日志,因为它可能会提供有关如何解释它的一些提示。

无论如何,正确的语法是:<If "-f %{DOCUMENT_ROOT} . '/maintenance.enable'">

关于apache - 如何在 Apache 2.4 上测试带有 <If ...> 标签的文件是否存在?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26138120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com