I've just installed WAMP and I can access localhost and get the phpinfo() output.
However, although I can see _SERVER['REQUEST_METHOD'] is set to GET, I'm trying to use the following PHP:
if ($_SERVER["REQUEST_METHOD"]=="POST") {
...
but it produces this error:
PHP Notice: Undefined index: REQUEST_METHOD in C:\ ... \test.php on line 40
Using Komodo to stop at line 40 and check $_SERVER - it does not have 'REQUEST_METHOD' in the array at all - not even GET.
Anyone have any ideas? Do I have to enable POST, REQUEST_METHOD?
Why can I see REQUEST_METHOD=GET in the phpinfo but not in the PHP script.
I also tried this:
<?php
ob_start();
phpinfo();
$info = ob_get_contents();
ob_end_clean();
?>
I generates some of the phpinfo (as viewed in the browser using localhost/?phpinfo=1) but not all of it. Why not?