Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include_once or require_once

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
include_once or require_once?

Anyone know the difference between

include_once "xxsql.php";

and

require_once("xxsql.php");

?

Which is better?
Thanks.
 
Not better. Different in how the two functions handle failure.

include() (and include_once()), on failure, issues a warning.

require() (and require_once()), on failure, issues a fatal error.

This is documented here





Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top