Hi!
Is there a ready to use PHP function for including ONLY if the file exists?
I tried it like this:
[main.php]
include_once(lib.php);
later
includeIf(somefile.php);
[lib.php]
function includeIf($filename)
{
if (!file_exists($filename))
{
On Fri, 27 Aug 2004 12:16:32 +0200, Jay [EMAIL PROTECTED] wrote:
Hi!
Is there a ready to use PHP function for including ONLY if the file exists?
I tried it like this:
[main.php]
include_once(lib.php);
.later
includeIf(somefile.php);
[lib.php]
function includeIf($filename)
{
Jay wrote:
Hi!
Is there a ready to use PHP function for including ONLY if the file exists?
I tried it like this:
[main.php]
include_once(lib.php);
later
includeIf(somefile.php);
[lib.php]
function includeIf($filename)
{
if (!file_exists($filename))
{
include_once($filename);
3 matches
Mail list logo