jussa
06-02-2007, 04:24 AM
Ok,
so i was reading on php.net website about the documention to the require and require_once() functions, and below is the part of it.
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 that if the code from a file has already been included, it will not be included again. See the documentation for require() for more information on how this statement works.
by script, does it mean a single webpage in your website, or any pages you visit?
i want to know, because instead of using require on all the pages that need to reference my classes, i was thinking of have a single page with require_once() for each of my classes.
i would then require_once() this reference file, in my index.php, so all my classes would be avaliable all the time... or am i thinking this in the totally wrong way?? :confused:
Thanks, Justin
so i was reading on php.net website about the documention to the require and require_once() functions, and below is the part of it.
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 that if the code from a file has already been included, it will not be included again. See the documentation for require() for more information on how this statement works.
by script, does it mean a single webpage in your website, or any pages you visit?
i want to know, because instead of using require on all the pages that need to reference my classes, i was thinking of have a single page with require_once() for each of my classes.
i would then require_once() this reference file, in my index.php, so all my classes would be avaliable all the time... or am i thinking this in the totally wrong way?? :confused:
Thanks, Justin