Page 1 of 1

URLs in require_once() not working

Posted: Sun May 03, 2009 4:52 pm
by RandyJohnson
I am having a problem or I am misunderstanding how the URLs work with require_once().

It is my understanding that if the first character of the URL is a '/' then PHP will look for the file starting at the document root.

Is this not correct?

I keep getting file not found errors.

Thanks in advance...

Randy

Re: URLs in require_once() not working

Posted: Sun May 03, 2009 5:31 pm
by requinix
The manual page for include tells you everything you need to know.

The fact that it doesn't mention filenames beginning with / means they'll be treated like they should be: as absolute filenames. Meaning the root of the filesystem, not the document root.