-1 ;)

I think it could make thing much more difficult and confusing actually.

I like to keep all my include files in a central place, and define a
constant __IncPath, where __IncPath is something like:

$Document_Root."libraries/"

That way I always just:

include(__IncPath."foo.php");
include(__IncPath."bar.php");

I guess this might not be the best in all situations, but I find it makes my
code more portable.  Define one constant, and all is well.

Although for newer users, you guys are probably very right.  Makes things
much easier when learning.  So I guess as long as it doesn't add to
ambiguity (would there be include_relative() or include($FilePath[,boolean
relative])... could be useful.

-Brian Tanner

-----Original Message-----
From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
Sent: July 8, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] Possible feature for current version of PHP or PHP
4.1/5.0.


Hey,

I think one thing that bothers PHP developers is when they do:
include "../foo.inc";
and in foo.inc they do:
include "bar.inc";

That bar.inc is not searched for in foo.inc's current directory
automatically. As we pretty much always have the expanded filename of the
current executing script I thought it would be nice to add that if bar.inc
is not found in the include_path to take the full path of foo.inc (i.e.
/path/to/foo_inc/foo.inc) and try opening /path/to/foo_inc/bar.inc.

What do you guys think?

Andi


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to