Name: Anonymous 2008-04-01 14:45
I have an index.php that include 2 thing:
1. cfg.php
2. testpage.php
In testpage.php I include database.php which is a small database class and that class need some informations from cfg.php (DBHost, DBUsername, ...)
The problem: database.php don't see the stuffs declared in cfg.php. Since I use include_once in index.php, even if I re-include it in database.php it won't work.
If I load it directly from database.php or testpage.php it work, but not via index.php.
1. cfg.php
2. testpage.php
In testpage.php I include database.php which is a small database class and that class need some informations from cfg.php (DBHost, DBUsername, ...)
The problem: database.php don't see the stuffs declared in cfg.php. Since I use include_once in index.php, even if I re-include it in database.php it won't work.
If I load it directly from database.php or testpage.php it work, but not via index.php.