ini_get -- Gets the value of a configuration option
Syntax
string ini_get ( string varname )
Returns the value of the configuration option on success. Failure, such
as querying for a non-existent value, will return an empty string.
When querying boolean values:
A boolean ini value of off will be returned as an
empty string or "0" while a boolean ini value of on will
be returned as "1".
When querying memory size values:
Many ini memory size values, such as
upload_max_filesize, are
stored in the php.ini file in shorthand notation.
ini_get() will return the exact string stored in the
php.ini file and NOT its integer
equivalent. Attempting normal arithmetic functions on these values
will not have otherwise expected results. The example below shows one
way to convert shorthand notation into bytes, much like how the PHP
source does it.
Example 1. A few ini_get() examples
<?php /* Our php.ini contains the following settings:
display_errors = On register_globals = Off post_max_size = 8M */
function return_bytes($val) { $val = trim($val); $last = strtolower($val{strlen($val)-1}); switch($last) { // The 'G' modifier is available since PHP 5.1.0 case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; }
ini get php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php ini get syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.