From: "Alex Hogan" <[EMAIL PROTECTED]>

> Are you saying that it's better not to use relative paths on
include(...)'s,
> require(...)'s and their (x)_once(...) cousins?
>
> That seems awkward to me.
>
> Why would I want to hard code a path, even if I was including additional
> functionality from another file?

Use whatever you're comfortable with because they both work. I'm just saying
that I stay away from relative includes, myself.

It's easy to just create a variable (or extract the data from $_SERVER) to
find out the absolute path and just use that as a variable. Then you can do
this:

include($_CONF['path'] . '/test.php');

for example. I make similar $_CONF variables for the html root of the site

$_CONF['html'] = 'http://www.bigredspark.com';

so that even the links in my html are full URLs instead of relative links.

To each his own.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to