note 37544 added to function.include

From: Date: Wed, 19 Nov 2003 11:07:19 +0000
Subject: note 37544 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-60615@lists.php.net to get a copy of this message
The @ directive works with this construct as well. My experience is you can use an if-statement to verify if the script was included (I havn't tested this on remote includes, there might be non-standard-404 pages that makes it impossible to verify you got the right page) Example: // ignore the notice and evaluate the return value of the script, if any. if(@include(dirname(__FILE__)."/foo.php")) echo "foo.php included"; else echo "failed to include foo.php"; ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37544 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37544&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37544&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60615) next »