RE: [PHP-GENERAL] include path inheritance
| From: | Christopher Thompson | Date: | Mon, 22 May 2000 18:48:29 +0000 |
| Subject: | RE: [PHP-GENERAL] include path inheritance | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298@lists.php.net to get a copy of this message | ||
How about:
file3.php
--------------------------------------
include "$includedir/file1.php";
include "$includedir/file2.php";
--------------------------------------
/myfiles
maindoc.php
--------------------------------------
echo "Testing<BR>";
$includedir='../includes';
include "$includedir/file3.php";
--------------------------------------
> -----Original Message-----
> From: Ryan Adams [mailto:radams@fcs.uga.edu]
> Sent: Monday, May 22, 2000 8:27 AM
> To: php-general@lists.php.net
> Subject: [PHP-GENERAL] include path inheritance
>
>
> Is there a method for including a file that allows it
> *not* to inherit the path of its including document?
>
> for instance:
>
> /includes/
> file1.php
> --------------------------------------
> echo "This Is ";
> --------------------------------------
>
> file2.php
> --------------------------------------
> echo "A Test.";
> --------------------------------------
>
> file3.php
> --------------------------------------
> inlcude "./file1.php";
> include "./file2.php";
> --------------------------------------
>
> /myfiles
> maindoc.php
> --------------------------------------
> echo "Testing<BR>";
> include "../includes/file3.php";
> --------------------------------------
>
>
> ==> (maindoc.php running (ideally))
> --------------------------------------
> Testing
> This Is A Test.
> --------------------------------------
>
> (file3.php doesn't inherit the path of the document that
> includes it)
>
>
>
> Any ideas?
>
> Ryan
>
> *************************************
> Ryan Adams
> Online Systems Development
> College of Family & Consumer Sciences
> The University of Georgia
> Athens, GA 30602
> (706) 583-0344
> radams@fcs.uga.edu
> *************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>