Home  >  Article  >  Backend Development  >  php dirname(_FILE_)

php dirname(_FILE_)

WBOY
WBOYOriginal
2016-06-13 13:12:07797browse

php dirname(__FILE__)

__FILE__的路径是当前代码所在文件

?

dirname(dirname(__FILE__));得到的是文件上一层目录名


dirname(__FILE__);得到的是文件所在层目录名

Statement:
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