如何测试,如果文件的标签&lt存在;如果...>在Apache 2.4? [英] How to test if file exists with the tag <If ...> on Apache 2.4?

查看:165
本文介绍了如何测试,如果文件的标签&lt存在;如果...>在Apache 2.4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测试一个文件是否存在在我的Apache 2.4的httpd.conf文件。

I would like to test the existence of a file in my httpd.conf of Apache 2.4.

我用的标签是这样的:

<如果%{}的DocumentRoot -f /maintenance.enable>
... code执行...
< /如果>

但我的code是不好的,Apache的服务不想要开始。
我读了很多教程或文档在许多网站,但从未找到了答案:(

but my code is not good, apache's service doesn't want to start. I have read a lot of tutorials or docs on many sites but never found the answer :(

请帮我...

推荐答案

阅读Apache的错误日志,它是:<如果-f%{DOCUMENT_ROOT}'/maintenance.enable'\">

Read Apache error log, it's: <If "-f %{DOCUMENT_ROOT} . '/maintenance.enable'">

这篇关于如何测试,如果文件的标签&lt存在;如果...&GT;在Apache 2.4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆