Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousrequire_onceFunctionsnext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German | Spanish

include_once()

The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. As the name suggests, it will be included just once.

include_once() should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions, variable value reassignments, etc.

For more examples on using require_once() and include_once(), look at the PEAR code included in the latest PHP source code distributions.

Huomaa: include_once() was added in PHP 4.0.1pl2

See also include(), require(), require_once(), get_required_files(), get_included_files(), readfile(), and virtual().

User Contributed Notes
include_once
add a note about notes
There are no user contributed notes for this page.
previousrequire_onceFunctionsnext
Last updated: Tue, 28 May 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST