I am trying to read variables from input method.
I am using this tuorial:
Here is my code:
    echo "this is a get request\n";
    echo $_GET['fruit']." is the fruit\n";
    echo "I want ".$_GET['quantity']." of them\n\n";
} elseif($_SERVER['REQUEST_METHOD'] == 'PUT') {
    echo "this is a put request\n";
    echo $post_vars['fruit']." is the fruit\n";
    echo "I want ".$post_vars['quantity']." of them\n\n";

I am using the firefox extension  "poster" to run this example. GET
works fine but when using PUT, file_get_contents("php://input")
returns an empty string.

I found a bug related to this: https://bugs.php.net/bug.php?id=51592

I am using xampp on win7 (
+ Apache 2.2.17
  + MySQL 5.5.8 (Community Server)
  + PHP 5.3.5 (VC6 X86 32bit) + PEAR)

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to