INCLUDE() scope issues?
Posted: Sun Mar 07, 2004 4:53 pm
So I'm sure this is a simple problem that lots of people have figured out, but I can't seem to find a solution anywhere, either on these forums or on the net or on PHP.net.
I have three files in three different directory locations:
/admin/clean_db.php
/classes/user.php
/init.php
I want to make clean_db.php INCLUDE() init.php, which in turn includes the user.php from the 'classes' directory.
Problem is, PHP doesn't seem to be able to find user.php when i do it this way. If I load init.php directly, it can find "classes/user.php" just fine, but if I load init.php by including it in clean_db (which is in a subdirectory), init can't find user.php
I've tried messing with init_set("include_path","path stuff here") but that doesn't seem to have much effect.
Any ideas?
I have three files in three different directory locations:
/admin/clean_db.php
/classes/user.php
/init.php
I want to make clean_db.php INCLUDE() init.php, which in turn includes the user.php from the 'classes' directory.
Problem is, PHP doesn't seem to be able to find user.php when i do it this way. If I load init.php directly, it can find "classes/user.php" just fine, but if I load init.php by including it in clean_db (which is in a subdirectory), init can't find user.php
I've tried messing with init_set("include_path","path stuff here") but that doesn't seem to have much effect.
Any ideas?