00 Votes

Get absolute path on webspace

Tip by Computer Expert | Last update on 2020-02-04 | Created on 2012-03-10

Sometimes, you need the absolute path of your web space, for example, to save or open files. Unfortunately, the path is usually more than unknown, especially for users of shared hosting providers.

This shall bring light into the darkness:

echo getcwd();

With the simple function getcwd() using PHP, you can easily and quickly get the absolute path of where the file containing the script is located.


About the Author

AvatarThe author has not added a profile short description yet.
Show Profile


Related Topics

Program in ZIP-Folder

Info | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.