Page 1 of 1

Instead of include

Posted: Mon Oct 06, 2003 8:52 am
by webfinearts
Instead to use include in my scripts, i'm using require and require_once.
What you advice me?

Posted: Mon Oct 06, 2003 9:13 am
by Nay
require and require_once practicly has the same effect if you're not using loops on anything. I would recommend require() since it'll stop the script once there's an error with the file, not just continue on like include().

-Nay

Also

Posted: Mon Oct 06, 2003 1:47 pm
by phpScott
There is also include_once that I find quite useful when editing other peoples code and I don't know what is already included in the page(s).

phpScott

Posted: Mon Oct 06, 2003 3:29 pm
by mudkicker
i use include and include_once if i add only html tags or or something with design and like this or not so important codes. for important and core codes i use require or require_once. The difference between the function and _once is explained by Nay.