note 117011 added to function.include
| From: | JeroMinh | Date: | Wed, 01 Apr 2015 10:55:42 +0000 |
| Subject: | note 117011 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202122@lists.php.net to get a copy of this message | ||
Notice that using @include (instead of include without @) will set the local value of
error_reporting to 0 inside the included script.
Consider the following:
<?php
ini_set('error_reporting', E_ALL);
echo "Own value before: ";
echo ini_get('error_reporting');
echo "\r\n";
echo "include foo.php: ";
include('foo.php');
echo "@include foo.php: ";
@include('foo.php');
echo "Own value now: " . ini_get('error_reporting');
?>
foo.php
<?php
echo ini_get('error_reporting') . "\r\n";
?>
Output:
Own value before: 32767
include foo.php: 32767
@include foo.php: 0
Own value now: 32767
----
Server IP: 72.52.91.14
Probable Submitter: 84.144.197.99
----
Manual Page -- http://php.net/manual/en/function.include.php
Edit -- https://master.php.net/note/edit/117011
Del: integrated -- https://master.php.net/note/delete/117011/integrated
Del: useless -- https://master.php.net/note/delete/117011/useless
Del: bad code -- https://master.php.net/note/delete/117011/bad+code
Del: spam -- https://master.php.net/note/delete/117011/spam
Del: non-english -- https://master.php.net/note/delete/117011/non-english
Del: in docs -- https://master.php.net/note/delete/117011/in+docs
Del: other reasons-- https://master.php.net/note/delete/117011
Reject -- https://master.php.net/note/reject/117011
Search -- https://master.php.net/manage/user-notes.php