Whats the difference between include and require?
Unlike include(), require() will always read in the target file, even if the line it’s on never executes. If you want to conditionally include a file, use include(). The conditional statement won’t affect the require(). However, if the line on which the require() occurs is not executed, neither will any of the code in the target file be executed. Typically, this won’t make a difference to you unless you write things like: See also require_once at http://www.php.net/require_once, which only will read the file one time, no matter how many times you include it. This solves some include issues, if you have lots of includes.
Related Questions
- We need to purchase School Agreement Licensing and require various products, indlucing XP Pro, Office 2003, Window CALs, SQL Cals and Exchange CALs. What is the best way to licence this?
- Does waterborne automotive paint require special vehicle preparation?
- Whats the difference between include and require?