note 22643 added to function.realpath
| From: | desolate19 at hotmail dot com | Date: | Tue, 25 Jun 2002 21:44:11 +0000 |
| Subject: | note 22643 added to function.realpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32197@lists.php.net to get a copy of this message | ||
I think a few of you are a little confused as to what this function is supposed to do.
The documentation says that the function resolves:
./
../
and extra '/' characters in the path,
Nothing about that says that the function should accept a URL. It's for local path resolution.
If you stop to think about it, there's no way you can resolve a full path from root on a remote
system just by having a url.
This function will give you the absolute path to a file. So if you know that include.php is two
directories above the script you are in
realpath('../../include.php');
would return the full path from / to include.php, whatever that may be.
--
http://www.php.net/manual/en/function.realpath.php
http://master.php.net/manage/user-notes.php?action=edit+22643
http://master.php.net/manage/user-notes.php?action=delete+22643
http://master.php.net/manage/user-notes.php?action=reject+22643