duanji1026 2013-08-14 06:44
浏览 54
已采纳

从PHP中的URL捕获变量值哪个最好,$ _GET或$ _REQUEST?

URL: http://stackcomplete.com?message=143

need to capture message variable value in PHP, i was confused which one is best $_GET or $_REQUEST

  1. $_GET['message']

or

  1. $_REQUEST['message']
  • 写回答

1条回答 默认 最新

  • dougourang1856 2013-08-14 07:10
    关注

    Go with $_GET

    $_REQUEST holds an associative array that by default contains the contents of $_GET, $_POST and $_COOKIE.

    Since you know that the parameter will be URL based. $_GET will suffice.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?