Preliminary patch for allowing relative includes
| From: | Andi Gutmans | Date: | Tue, 10 Jul 2001 17:24:25 +0000 |
| Subject: | Preliminary patch for allowing relative includes | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59584@lists.php.net to get a copy of this message | ||
Hi guys,
Attached is a patch which I worked up quickly (could probably use some
improving) which should solve the problem with includes of relative
includes :)
Simpler said:
a.php
-----
<?php include "../b.php"; ?>
b.php
-----
<?php include "c.php"; ?>
c.php
-----
<?php print "Yay!" ?>
This example should work when c.php is in the same directory as b.php and
PHP is ran on a.php.
Please check this patch. It might crash in certain cases, I barely tested
it.
Let me know...
Andi