ini_set

string ini_set(string name Name of setting to change, string value New value of 
setting) 

Alters the value of a PHP configuration option.

Returns:

Previous value of setting; FALSE on error

Description:

Alters the value of a PHP configuration option. This is not a permanent change and exists only for the lifetime of the script calling the function. This function is also aliased to ini_alter().

Version:

Existing since version 4.0

Example:

Alter the value of magic_quotes_gpc
$option = 'magic_quotes_gpc'; 
echo "Value of $option => ", ini_get($option); 
ini_set($option,0); 
echo "New value of $option => ", ini_get($option); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.