Whats the difference between require_once and include_once? I been running into a problem, perhaps someone can help.
I require_once in a Pear database extension. Inside that pear database extension is a require_once("pear.php") and a require_once("db.php") This file, Thomas Voxs' DbPage.php file, gets require_once inside yet another file (my file). The problem is, my file brings in many require_once file's, some of which require_once(db.php) inside of it. All I get redefinition problems all over the place. It appears to me that require_once doesn't work as advertised? For if it did, there should never be redefinition problems. Why didn't all PHP code do like we do in C/C++ with #define BLAH if !defined(BLAH) { your code here. } I realize the #define trick works as I used it in my own PHP code... but when the basic PHP core files don't have this in them, it sort of makes require_once and include_once hacks! (that don't work) Any ideas suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php