Hello all,
I have been using require_once() throughout my scripts because I thought it would save the processor time keep looking up the same function include file.
But it seems I might be wrong !
The Manual says
The require_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the require() statement, with the only difference being
Does this mean the require_once() is only useful if you use it in the same script more than once ?
I have about 30 different scripts that start like this:
/*
* a_get_detail.php
*
*
* Connects to tables and extracts the data
*/
require_once("my_functions.php");
other code ....
I have also just read that require_once() is slower than the standard require() function.
In this case is it better for me to be using require() as I don't think I am gaining anything from using require_once().
Thanks for any advice.