I have PHP file where I have defined the server access variables as well as the mysql_connect and mysql_select_db, as this functions are regularly
"."Included"."
";
include_once('db.php');
echo "
"."Again included"."
";
?>
In the Above Code, I have included a file using include statement at the top, the file get included.
Next I have used include_once to include the same file, But as the file was already included above, it will not be included again here.
Connected -----This is from db.php File
Included
Again included
==========================
include_once('db.php');
echo "
"."Again included"."
";
include('db.php');
echo "
"."Included"."
";
?>
In the above code, I have used include_once at the top, so the file is included But in the next code I have again used include_once for the same file, then again the file will get included and the output will be
Again included
Connected
Included
Connected