Library File Inclusion

File inclusion is a wonderful concept that enables you to write library files and reuse them when you need to in other programs. Table 4-11 covers the four functions that enable you include PHP library files.

Table 4-11. File Inclusion Statements
Statement NameDescription
include("path/name");The include() statement takes a single argument, which needs to be a string containing an absolute or relative path statement and file. The file needs to contain a working PHP program unit that is delimited by <?php and ?> tags. The include() statement should only occur once per file, or you will inherit multiple copies of the library. The include() statement will raise a nonfatal warning if the file is unavailable.
include_once("path/name"); ...

Get Oracle Database 10g Express Edition PHP Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.