PHP把问号后面所有变量全放在$_GET[]数组中!

解决方案 »

  1.   

    <?php
    echo $_GET["textfield"];
    ?>
    <form name="form1" method="get" action="test.php">
      <input type="text" name="textfield">
      <input type="submit" name="Submit" value="提交">
    </form>
      

  2.   

    Undefined index: QUERY_STRING
      

  3.   

    用环境变量
    $_GET[QueryString]
      

  4.   

    test.php?var1=1&var2=2<?
    echo $_GET['var1'];
    echo $_GET['var2'];
    ?>
      

  5.   

    test.php?var1=1&var2=2$_GET['VAR1']
    如果是POST传递的话可以用
    $_POST['VAR1']
    如果把php.ini中的全局变量global设为off就可直接用
    $var1取值