I'm a newbie in PHP. I'm analyzing an existing source code and found this.
// this is the some.php itself!!!
<?
include_once("./some.php"); // is this normal?
...
?>
I'm a newbie in PHP. I'm analyzing an existing source code and found this.
// this is the some.php itself!!!
<?
include_once("./some.php"); // is this normal?
...
?>
NO.
There is no reason to include current file, itself.
If using include() not include_once(), it raise infinite loop.
The include_once()
statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include()
statement, with the only difference being that if the code from a file has already been included, it will not be included again.
As the name suggests, it will be included just once. There is no reason to do it..