note 9218 modified in include by jmcastagnetto

From: Date: Thu, 26 Oct 2000 00:16:35 +0000
Subject: note 9218 modified in include by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-6978@lists.php.net to get a copy of this message
[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"; } http://www.php.net/manual/function.include.php

« previous php.notes (#6978) next »