Monday, February 23, 2009

PHP Tutorial : getcwd get full path on host

How many scripts which you have/had to install requires/required you to enter somewhere in a config php file to enter and setup the full path of your account in the web host? There are few I guess. The full path on the ftp consists in a linux like full path in the most of the cases.

You can get it by using the getcwd() php function which means I think Get Current Working Directory or something like that.

<?php
$fullpath = getcwd();

print
"My full path is $fullpath";
?>

No comments:

Post a Comment

Share_this