note 56773 added to function.realpath
| From: | JonnyRylands at osu1 dot php dot net | Date: | Wed, 14 Sep 2005 22:19:43 +0000 |
| Subject: | note 56773 added to function.realpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95189@lists.php.net to get a copy of this message | ||
Having problems with includes within include files,
particularly when the include files are in different directories?
This syntax allows:
* relative paths to be used in include strings.
* include files to include other files in different directories.
without getting file not found errors.
<?
include_once realpath(dirname(__FILE__)."/relative/path/to/include.inc.php");
?>
----
Manual Page -- http://www.php.net/manual/en/function.realpath.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56773
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56773&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56773&report=yes
Search -- http://master.php.net/manage/user-notes.php