Orcas Bob Posted September 21, 2009 Share Posted September 21, 2009 I'm having trouble accessing the query string with $_GET. Using a command line of: http://localhost:38094/word_passed_in_the_url_is.php?resource=apples My test program gives: _SERVER["QUERY_STRING"]: resource=apples _SERVER["REQUEST_URI"]: /word_passed_in_the_url_is.php?resource=apples var_dump($_REQUEST): array(0) { } var_dump($_GET): array(0) { } Trying to access $_GET throws an error because it is undefined. It's odd because _SERVER["QUERY_STRING"] is populated. My system is Expressions WEB 3.0 using it's development server, Windows 7, and PHP 5.3.0 phpinfo(); runs fine. The folks at the WEB Expression message board have not seen this before. <?php echo '<br>_SERVER["QUERY_STRING"]: ' . $_SERVER["QUERY_STRING"]; echo '<br>_SERVER["REQUEST_URI"]: ' . $_SERVER["REQUEST_URI"]; echo '<br>var_dump($_REQUEST): '; var_dump($_REQUEST); echo '<br>var_dump($_GET): '; var_dump($_GET); echo '<br><br>'; echo '<pre>'; phpinfo(); echo '</pre>'; ?> Link to comment https://forums.phpfreaks.com/topic/175049-_get-not-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.