Page 1 of 1

Brain block with require

Posted: Tue May 11, 2004 10:33 am
by JayBird
having a brainblock with require

i have a directory structure like this

Code: Select all

root
|_includes <dir>
| |_onlineusers.php
| |_config.php
|_index.php
in index, i require onlineusers.php, no problem there. But in onlineusers.php, i need to require config.php but i just cant get it to work!

i thought in onlineusers.php i would just need to do

Code: Select all

require ("config.php");
Mark

Posted: Tue May 11, 2004 10:37 am
by markl999
Hmm..yeah. If you can require onlineusers.php from index.php then it sounds like the includes directory is in your include_path, which means you should be able to require config.php from onlineusers.php as you suggested, ...weird.

Posted: Tue May 11, 2004 10:43 am
by Wayne
as Mark said sounds weird ... should work?!
if none of these work ...

Code: Select all

require ("config.php");
require ("includes/config.php");
require ("full/path/to/includes/config.php");
then are you sure the perms on the files are correct?

Posted: Tue May 11, 2004 10:57 am
by JayBird
Sorted.

I had changed some code in index.php, but not re-uploaded it....DOH!!!

1 hour wasted :)

Mark