note 106365 added to function.include

From: Date: Mon, 31 Oct 2011 13:33:58 +0000
Subject: note 106365 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-184244@lists.php.net to get a copy of this message
Howdy guys, just a quick one. While trying to report a custom result of a require()... I found this as the most practical method. The @ suspends the errors message, and allows me to command the script to die, when i choose. $report[0] = @include('php/file_was_found.html'); // RETURNS : int(1) $report[1] = @include('php/file_not_found.html'); // RETURNS : bool(false) Remember that the code above, DOES perform the include if the file is available. ---- Server IP: 69.147.83.197 Probable Submitter: 77.97.66.238 ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- https://master.php.net/note/edit/106365 Del: integrated -- https://master.php.net/note/delete/106365/integrated Del: useless -- https://master.php.net/note/delete/106365/useless Del: bad code -- https://master.php.net/note/delete/106365/bad+code Del: spam -- https://master.php.net/note/delete/106365/spam Del: non-english -- https://master.php.net/note/delete/106365/non-english Del: in docs -- https://master.php.net/note/delete/106365/in+docs Del: other reasons-- https://master.php.net/note/delete/106365 Reject -- https://master.php.net/note/reject/106365 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184244) next »