简体   繁体   中英

How to read query strings without knowing variable's names?

I want to read all query strings that send from an URL, But I don't know variable's names to using $_REQUEST['variable1'] . So What I must do?

$_SERVER['QUERY_STRING']包含所需的所有查询字符串。

you could do this var_dump($_REQUEST); It will dump everything onto screen for you

foreach ($_REQUEST as $var_name => $value) {
    //your stuff
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM