Home > Backend Development > PHP Tutorial > php 如何得到一个人的homedir 路径。

php 如何得到一个人的homedir 路径。

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:15:39
Original
1035 people have browsed it

比如marry登录网页,我要看marry的 home dir下是否有一个文件"test":
我用这个不好使:
if (file_exists("~marry/test"))

只有给绝对路径才行,请大侠帮帮我,如何得到这个人的homedir?
或者有什么办法访问登录者hoemdir下的文件。

非常谢谢您的帮忙。


回复讨论(解决方案)

不懂楼主什么意思

数据库肯定有该用户映射的系统路径记录的,读出来就行了

用php里面的exec()函数执行shell命令 在拼接成用户的路径

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template