note 72277 added to function.get-cfg-var
| From: | Stephen at osu1 dot php dot net | Date: | Wed, 10 Jan 2007 19:21:44 +0000 |
| Subject: | note 72277 added to function.get-cfg-var | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121540@lists.php.net to get a copy of this message | ||
Regarding the statement by the earlier poster that:
"Unfortunately, you almost never want to know the original value in the config file. Instead,
you want to know the value currently in effect."
I have found this useful for changing the error reporting levels for a few specific pages while
testing. I turn on all error_reporting while testing, but for a few pages I want to turn off
notices. So, I put this at the top of the page:
error_reporting(8183);
and this at the bottom:
error_reporting(get_cfg_var('error_reporting'));
to put it back to whatever default I had at the time.
----
Server IP: 64.71.164.2
Probable Submitter: 68.163.200.198
----
Manual Page -- http://www.php.net/manual/en/function.get-cfg-var.php
Edit -- https://master.php.net/note/edit/72277
Del: integrated -- https://master.php.net/note/delete/72277/integrated
Del: useless -- https://master.php.net/note/delete/72277/useless
Del: bad code -- https://master.php.net/note/delete/72277/bad+code
Del: spam -- https://master.php.net/note/delete/72277/spam
Del: non-english -- https://master.php.net/note/delete/72277/non-english
Del: in docs -- https://master.php.net/note/delete/72277/in+docs
Del: other reasons-- https://master.php.net/note/delete/72277
Reject -- https://master.php.net/note/reject/72277
Search -- https://master.php.net/manage/user-notes.php