-----006-variable.php-----
1<! DOCTYPE html>234<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">5<title> a PHP page </title>67<body>8<?PHP9 //Static variable testingTen functionstatic_test () One { A Static $haha= ""; - $haha. = "Ha"; - Echo $haha." <br/>\n "; the } - static_test (); - static_test (); - static_test (); + static_test (); - static_test (); + static_test (); A static_test (); at?> -</body> ------007-predefine_variable.php-----
Pre-defined variables
1<! DOCTYPE html>234<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">5<title> a PHP page </title>67<body>8<pre>9<?PHPTen Echo"IP address is:",$_server[' REMOTE_ADDR '], ' <br/> '; One Echo"User agent is:",$_server[' Http_user_agent '], ' <br/> '; A?> - -<?PHP the foreach($_server as $key=$value) - { - Echo $key." : ".$value." \ n "; - } +?> - +<?phpPrint_r($GLOBALS);?> A<br/> at<?PHP - Print_r($_request); - //Print_r ($_session); #未识别的变量 -?> -</pre> -</body> in