PHP display current server path

后端 未结 6 1043
春和景丽
春和景丽 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条回答
  •  Happy的楠姐
    2020-12-29 21:30

    You can also use the following alternative realpath.

    Create a file called path.php

    Put the following code inside by specifying the name of the created file.

    
    

    A php file that you can move to all your folders to always have the absolute path from where the executed file is located.

    ;-)

提交回复
热议问题