PHP: let a file return its own directory

后端 未结 4 2192
盖世英雄少女心
盖世英雄少女心 2021-01-25 19:06

I am having trouble finding the rigth directory on my online server. is there a function that returns the folder the file is stored in?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-25 19:59

    http://php.net/manual/en/function.getcwd.php

    Returns the current working directory on success, or FALSE on failure.

提交回复
热议问题