This might be kinda a dumbass question, but I just want some clarification of whether my interpretation is correct.
include_once() and require_once() prevent the inclusion of the same file multiple times by building a "table" of previously included files and comparing new requests to that table. If you call require_once() on a file which you've previously required()'ed in the script, require_once() will call that file again correct (and the same for include/include_once)?
thanx!!
-geoff
No (if i understood u correctly)
If you run:
include('foo'); include_once('foo');
It will only be included once.
Derek
Forget my answer... im not sure. I just tested it and I really can't tell if it does it twice or once... let me try something else and ill repost
Alright, my first post was right...
Test it ourself by making a file that just contacts text, then in a php file do:
whatever was in foo will only be outputted once.