Zend::loadFile()
loads a PHP file, which may contain any PHP code. It is a wrapper for the
PHP function include()
that throws
Zend_Exception
on failure.
<?php loadFile($filename, $dirs=null, $once=false) ?>
The $filename
argument specifies the filename to load, which must not contain
any path information. A security check is performed on $filename
. The
$filename
may only contain alphanumeric characters, dashes ("-"), underscores ("_"), or
periods ("."). No such restriction is placed on the $dirs
argument.
The $dirs
argument specifies directories to search for the file. If
NULL
, only the include_path
will be searched. If a string
or an array, the directory or directories specified will be searched, and then the
include_path
.
The $once
argument is a boolean that specifies whether to use the PHP
functions include()
or include_once()
for loading the file.