note 9218 deleted from function.include by vincent

From: Date: Mon, 08 Sep 2003 15:09:23 +0000
Subject: note 9218 deleted from function.include by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55842@lists.php.net to get a copy of this message
Note Submitter: sysopopfor@usa.net ---- [Editor's note: Another option is to use include_once() and get_included_files()] I found a way to check for an include and include it if it exists, or show a missing page or error message. The only drawback is if there are errors in the included file, $success returns false. Use @ to suppress the error, and control it yourself. $success = @include($yourinclude); if (!$success) { print "Can't find page $yourinclude"; }

« previous php.notes (#55842) next »