Forum Moderators: coopster
I am getting an error when I try to use includes with variables inside.
For example:
This works:
include 'http://localhost/site/lib/users.php';
This doesn't work:
$CFG->wwwroot = "http://localhost/site";'
include $CFG->wwwroot.'/lib/users.php';
For some reason the example that doesn't work, sees the file, but the code doesn't work inside.
Can someone explain this to me? I hope I gave you enough information, if not I can give you more.
Thanks. :)
Wes
I am trying to include a file that has my connection to the db. Considering my site has php files not in the root directory i need to call the db from all the pages even the ones not in the root. my include before was include("lib/db_config.php"); but i need it to be include($libdir/db_config.php). When I do this it finds the file, but the site doesnt connect to the DB anymore.
Does anyone know why? :S
Thanks
Wes