Australia's Leading Digital Marketing Experts. T. 1300 235 433  |  Aggregation Enquires Welcome

Find Current Working Directory

Some of our code requires you locate your current working directory (or full server path). While there's ,more than a few methods, PHP's getcwd() may be the easiest.

1
echo getcwd();

Save in a text file called cwd.php and browse to that page with your browser. It'll print the working directory to your screen.

Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkdin
Share on pinterest
Share on Pinterest

Leave a comment