PHP display current server path

后端 未结 6 1040
春和景丽
春和景丽 2020-12-29 20:28

I need to setup a path in my php but I currently don\'t know the path.

I need to configure the paths to the uploads directory

Should look like this below:

6条回答
  •  失恋的感觉
    2020-12-29 21:17

    • To get your current working directory: getcwd() (documentation)
    • To get the document root directory: $_SERVER['DOCUMENT_ROOT']
    • To get the filename of the current script: $_SERVER['SCRIPT_FILENAME']

提交回复
热议问题