如:http://localhost/test.php?id=555 在PHP中如何获得ID后面的值啊?可以像ASP中用request获取吗?望各位指点一下

解决方案 »

  1.   

    $_REQUEST["id"]
    print_r($_REQUEST);
    print_r($_POST);
    print_r($_GET);
    print_r($_COOKIE);
      

  2.   

    通过http://localhost/test.php?id=555这样传递过来的,可以使用$_GET,$_REQUEST来获取值,$_POST此时是获取不了值的,有错误请指出!谢谢!!
      

  3.   

    通过http://localhost/test.php?id=555这样传递过来的,可以使用$_GET,$_REQUEST来获取值,$_POST此时是获取不了值的,有错误请指出!谢谢!!
      

  4.   

    empty()判断是否为空,为空返回true
    is_numeric(PHP 4 )is_numeric --  检测变量是否为数字或数字字符串
    描述bool is_numeric ( mixed var)  如果 var 是数字和数字字符串则返回 TRUE,否则返回 FALSE。
      

  5.   

    $id=$POST['id'];
    if(!empty($id)){
    //写入你想要实现的代码
    }