Get the full path to script via php

Ever wanted to know what the full path is to a certain script on your server?

Well here is a quick way to find out.

1. copy the following 3 lines of php code into a file called fullpath.php on your desktop

<?php
echo getcwd();
?>

2. upload the file to the directory on the server you wish to know the full path to

3. go to that url and view the script (example. yourdomain.com/fullpath.php)

Login