Posted by: M A Hossain Tonu on: November 18, 2008
Include Vs Require
include() and require() are slightly different. Basically, include is conditional and require is not.
This would include ’somefile’ if $something is true:
if($something){
include(“somefile”);
}
This would include ’somefile’ unconditionally
if($something){
require(“somefile”);
}
This would have VERY strange effects if somefile looked like:
} echo “Ha! I’m here regardless of something: $something<br>n”;
if (false) {
Another interesting [...]
Recent Comments