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.
include_once() should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions, variable value reassignments, etc.
Замечание: include_once() was added in PHP 4.0.1pl2
Пример 12-9. include_once() is case sensitive
include_once("a.php"); // this will include a.php include_once("A.php"); // this will include a.php again on Windows!
В настоящее время версия PHP для Windows не поддерживает возможность использования удаленных файлов этой функцией даже в том случае, если включена опция allow_url_fopen.