Werbung
ini_restore
(PHP 4, PHP 5)
ini_restore — Restores the value of a configuration option
Beschreibung
void ini_restore
( string $varname
)
Restores a given configuration option to its original value.
Parameter-Liste
- varname
-
The configuration option name.
Rückgabewerte
Es wird kein Wert zurückgegeben.
Beispiele
PHP Code
1
2
3
4
5
6
2
3
4
5
6
$setting = 'y2k_compliance';
echo 'Current value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;
ini_set($setting, ini_get($setting) ? 0 : 1);
echo 'New value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;
ini_restore($setting);
echo 'Original value for \'' . $setting . '\': ' . ini_get($setting), PHP_EOL;
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
Current value for 'y2k_compliance': 1 New value for 'y2k_compliance': 0 Original value for 'y2k_compliance': 1
Siehe auch
- ini_get() - Gets the value of a configuration option
- ini_get_all() - Gets all configuration options
- ini_set() - Sets the value of a configuration option