Home > Backend Development > PHP Tutorial > php如何获取apache的路径

php如何获取apache的路径

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:45:00
Original
1653 people have browsed it

php如何获取apache的路径

图片是我phpinfo的截图。
是可以获取apache的路径的,有没有一个函数可以在php里直接获取呢?

回复内容:

php如何获取apache的路径

图片是我phpinfo的截图。
是可以获取apache的路径的,有没有一个函数可以在php里直接获取呢?

这个一般就是问google最快捷。搜索你的标题,通常第一条就是你要的。

你可以先找到你的 httpd.conf 文件
然后

➜  Documents  cat /private/etc/apache2/httpd.conf | grep ServerRoot| grep -v "#"
ServerRoot "/usr"
Copy after login

把这个命令放到 php 的 exec 或是 system 之类的命令执行就可以了

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template