echo $test;
试试呢,可能global变量开了
看看php.ini文件

解决方案 »

  1.   

    那你 echo $test;不就可以得到吗。
      

  2.   

    <form name='form1' method="post" action="test.php">
      <input type=hidden name=action value=xxx>
      <input type="submit" name="Submit" value=\"提交"/>
    ..
    </form>test.php
    if( ($_SERVER['REQUEST_METHOD']=="POST")&&($_POST['action']=='xxx') ){
        ...
        ...
    }
      

  3.   

    <form action=test.php><input type=text name=test></form>
    里面没提交怎么得到,还有form里面指定提交方法。
    <FORM METHOD=POST ACTION="test.php" enctype="multipart/form-data">
    <input type=text name=test>
    <INPUT TYPE="submit" VALUE="提交">
    </form>
      

  4.   

    <form action=test.php><input type=text name=test></form>
    在没有指定method的情况下,默认的method是get,也就是说你要用$_GET[test]来接受变量。
    如果你指定method为post,就用$_POST[test],在register_global为on的状态下,可以直接用$test.
      

  5.   

    uGain(uGain.org) ( ) 信誉:157 
    好细心啊,呵呵其实自动变量是蛮好的一个功能,我是一直开着的。
      

  6.   

    但是默认似乎是不开的
    所以为了保证自己代码的通用,我都$_POST[]