Page 1 of 1

[Solved] Viewing Full Path On The Server

Posted: Wed Feb 23, 2005 12:06 pm
by jimbo
hey guys, I don't know what command I need to use. I want to view the full path on the server, which would look something like this /home/tuxphp/public_html/findpath/filename.php

I found $PHP_SELF, but that will only give me /findpath/filename.php I need the full path starting with /home

Thanks

Posted: Wed Feb 23, 2005 12:26 pm
by timvw
look in the manual under the filesystem functions.... it's called realpath or something alike....

Re: Viewing Full Path On The Server

Posted: Wed Feb 23, 2005 12:32 pm
by Weirdan
jimbo wrote:... which would look something like this /home/tuxphp/public_html/findpath/filename.php
http://php.net/manual/en/language.const ... efined.php

Code: Select all

echo __FILE__;

Posted: Wed Feb 23, 2005 12:41 pm
by jimbo
Thanks, __FILE__ is perfect

[Topic Solved]