How to get absolute path on a web server using PHP ?

We can find absolute path in different ways on a web server using PHP, I am showing some of that practices here

The description of the functions used in this tutorial are as follows

realpath() , This function removes all symbolic path and returns the absolute path name , this function return false an failure

dirname() , Returns the parent directory path

getcwd(), function get the current working directory , returns true on success return flase on failure

$_SERVER is an array with headers,path,script location information.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
DMCA.com Protection Status
0
Would love your thoughts, please comment.x
()
x