Skip to content

Get Server Root Path of Folders via FTP

PHP Code Snippets > Get Server Root Path of Folders via FTP

by Steve Dawson Web Developer

Get-Path will allow you to find the full root PHP path of a folder on your server or web hosting plan. This is ideal for finding out any full root paths which some PHP scripts require to run properly.

Download the PHP GetPath zip file form our download section and then upload the getpath.php file to your web hosting plan, into the folder you would like to get the full root path for. Then just call the page in the browser. You will then see displayed the full root path to that folder.

Or you can copy and paste the following code into a blank PHP page and upload to your web hosting plan.

<?php echo str_replace("\\","/",getcwd()); ?>

REMEMBER to delete this file from your server after you have used it.

Free Quote available for any custom PHP and Database Software, Contact Steve Dawson Today