note 28733 added to function.include
| From: | yves dot fleury at sympatico dot ca | Date: | Wed, 22 Jan 2003 16:36:40 +0000 |
| Subject: | note 28733 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42597@lists.php.net to get a copy of this message | ||
Please excuse me for my english, I am french.
I have a php page in that subdirectory
www.mydomain.com/subdir1/subdir1.2/page1.php
that page call another php page for include()
this page is in
www.mydomain.com/subdir5/page_to_be_include.php
in my page1.php I include page_to_be_include.php like this
<?php
$root=str_repeat("../", substr_count($PHP_SELF,"/")-1);
include ($root."subdir5/page_to_be_include.php");
that code work very well.
Now, I have a suggestion for next version of php.
I recomment to the phpteam to create a new function like this:
Include_from_root_domain("subdir5/page_to_be_include.php");
I think this function is to be usefull
--
http://www.php.net/manual/en/function.include.php
http://master.php.net/manage/user-notes.php?action=edit+28733
http://master.php.net/manage/user-notes.php?action=delete+28733
http://master.php.net/manage/user-notes.php?action=reject+28733