Blogger Information
Blog 250
fans 3
comment 0
visits 321538
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
常用的全局变量
梁凯达的博客
Original
746 people have browsed it

实例

<?php

 // var_dump($_SERVER);
 // echo $_SERVER['SERVER_ADDR'];//服务器ip地址
 // echo '<br/>';
 // echo $_SERVER['REMOTE_ADDR'];//用户ip地址
 // echo '<br/>';
 // echo $_SERVER['HTTP_REFERER'];//上级来源地址
 // echo '<br/>';
 // echo $_SERVER['DOCUMENT_ROOT'];//根目录的绝对路径
 // echo '<br/>';
 // echo $_SERVER['SCRIPT_NAME'];//当前运行的脚本名(路径)
 // echo '<br/>';
 // echo $_SERVER['QUERY_STRING'];//get请求所带的参数列表字符串显示
 // echo  '<br/>';

 var_dump($_GET);
?>
 <!-- 如果form表单传值方式为get 那么我们使用action传递参数的时候是不生效的!! -->
 <form action="demo.php" method="get">
  <input type="text" name="name"><br/>
  <input type="text" name="ccc" value="111"><br/>
  <input type="submit" value="提交">
 </form>
 <a href="demo.php?name=zhangsan&age=20">百度</a>

运行实例 »

点击 "运行实例" 按钮查看在线实例

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post