Mindaugas L wrote:
Hi can anybody explain how require works, and what's the difference between _once and regular? What's going on when php file is processed? In manual is written just, that it's readed once if include_once. What does to mean "readed"? Thank You
The difference between include and require is that if include() can't find a file, it produces a warning, and the script continues. If require() can't find a file, the script dies with a fatal error.
The difference between include()/require() and include_once()/require_once() is that if you do, say, require_once() twice, it ignores the second one. This is useful if your script might include the same file in different places (perhaps your main script includes two other scripts which both themselves include "functions.php")
Regards, Adam Zey. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php