Hello,
It's often said that includes should have relative paths instead of absolute paths. This ensures that your script still works when you move it to a different server. So if an error has forced you to use rel paths consider it a blessing in disguise :-)



Ty Lamb wrote:


/index.php
has include("/code/includes/page_header.php");


/docs/aaryn/dmb/dave.php
has
include("/code/includes/page_header.php");

Both are identical lines of code.  Index.php works but dave.php returns the
following:

Warning: Failed opening '/code/includes/page_header.php' for inclusion
(include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4

but if I change the code in dave.php to
include '../../../code/includes/page_header.php';

It works.

Why?

Is there any way around this?  Please tell me I'm doing something wrong and
it's not supposed to work like this!!!

Ty...





--
http://www.radinks.com/upload
Drag and Drop File Uploader.

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



Reply via email to