Last Updated: February 25, 2016
·
464
· jentanbernardus

A simple way to find your absolute path.

Sometimes an application may ask for an absolute path to a folder/file in your hosting account. Finding that can be hard – you often have to dig around on your host’s site or contact them for that info.

Here’s an easy way to do it: create a new .php file and upload this to the account.

<?php
  $path = getcwd();
  echo "Your absolute path is: ";
  echo $path;
?>

Then just navigate to that file in a web browser and it will display your absolute path.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#php
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside