note 97248 added to function.constant
| From: | dachnik at osu1 dot php dot net | Date: | Sat, 10 Apr 2010 06:41:55 +0000 |
| Subject: | note 97248 added to function.constant | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168099@lists.php.net to get a copy of this message | ||
You can define values in your config file using the names of your defined constants, e.g.
in your php code:
define("MY_CONST",999);
in you config file:
my = MY_CONST
When reading the file do this:
$my = constant($value); // where $value is the string "MY_CONST"
now $my holds the value of 999
----
Server IP: 69.147.83.197
Probable Submitter: 173.71.53.175
----
Manual Page -- http://www.php.net/manual/en/function.constant.php
Edit -- https://master.php.net/note/edit/97248
Del: integrated -- https://master.php.net/note/delete/97248/integrated
Del: useless -- https://master.php.net/note/delete/97248/useless
Del: bad code -- https://master.php.net/note/delete/97248/bad+code
Del: spam -- https://master.php.net/note/delete/97248/spam
Del: non-english -- https://master.php.net/note/delete/97248/non-english
Del: in docs -- https://master.php.net/note/delete/97248/in+docs
Del: other reasons-- https://master.php.net/note/delete/97248
Reject -- https://master.php.net/note/reject/97248
Search -- https://master.php.net/manage/user-notes.php