PHP/Utility Function/ ENV
Содержание
Reading an environment variable, $_ENV["USER"]
<?php
$name = $_ENV["USER"];
?>
Reading another environment variable,$_ENV["HOME"]
<?php
print $_ENV["HOME"];
?>
Reading Environment and Configuration Variables
<?php
echo $_ENV["ProgramFiles"] . "<br />";
echo $_ENV["COMPUTERNAME"] . "<br />";
echo getenv("COMPUTERNAME") . "<br />";
echo ini_get ("post_max_size") . "<br />";
print_r (ini_get_all());
?>
Setting Environment and Configuration Variables
<?php
echo $_ENV["COMPUTERNAME"] . "<br />";
$_ENV["COMPUTERNAME"] = "Hello World!";
echo $_ENV["COMPUTERNAME"] . "<br />";
echo ini_get ("post_max_size");
ini_set("post_max_size","200M");
?>