Re: does PHP have a equivalent to the C++ #ifndef #define?

From: Date: Sun, 10 Aug 2003 15:12:11 +0000
Subject: Re: does PHP have a equivalent to the C++ #ifndef #define?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159032@lists.php.net to get a copy of this message
Hello, This is a reply to an e-mail that you wrote on Sun, 10 Aug 2003 at 15:51, lines prefixed by '>' were originally written by you. > I'm coding a really large web page in PHP. One of the problems I run > into is I'll create a function in file inc.function.something.php and > will need a function included in inc.function.somethingelse.php. If I > require() somethingelse.php in something.php and it's already been > required in main.php, I get an error about the function being defined > twice. You can use the require_once() and include_once() functions instead of require() and include() to avoid this happening. All the best, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Free PHP error handling script: www.phpmachine.com/error-handler/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/

« previous php.general (#159032) next »