I dunno whose answer you were thinking of... include_path('.:/var/www/html'); PHP will find it in /var/www/html My answer was to set include_path correctly, and NOT attempt to hack up some hard-coded mess in your PHP source. On Thu, October 5, 2006 4:29 pm, Deckard wrote: > Hi Richard, > > Thank you so much for your answer. > > dbInsert.php is in /var/www/html/classes while config.inc.php is in > /var/www/html > > With your code, the file is always searched in /var/www/html/classes > and > not in /var/www/html > > Warm Regards, > Deckard > > Richard Lynch wrote: >> On Thu, October 5, 2006 2:34 am, John Wells wrote: >>> [code] >>> // Consider *where* you create this >>> // Define it as a constant if you'd like... >>> define('BASE_PATH', dirname(__FILE__)); >>> >>> // Now build the path, like (assuming it was created >>> // in a file located at /var/www/html >>> include_once(BASE_PATH . '/config.inc.php'); >>> [/code] >> >> Gah! >> >> Now you've made it even HARDER to move the include files out of the >> web tree, or wherever is more convenient and safer. >> >> include_path is a much more powerful and flexible construct which >> will >> save you an inordinate amount of trouble if you just figure out how >> it >> works and use it... >> > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php