Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problem with include
December 2, 2004, 7:38 pm
rate this thread
When I try to use include with relative path, I've got the error:
Fatal error: main(): Failed opening required '..\includes\db.php'
/home/users/peter/public_html/events/users/logon.php on line 13
But during testing the same code on localhost I had no problems. Where
is the problem and how to solve it? Do I have to define include_path?
- Patrick Trettenbrein
December 3, 2004, 5:35 am
Re: Problem with include
Not sure this is you problem - but I've had the same type of problem.
You said ".. on localhost" - so I assume that you're then ftp'ing
the code to a hosting machine. Depending on the set up there you're
going to have to do: include ("/host14/vm7/abc123/home/users/peter...");
because the "real" path to you file is not you think it is.