Re: New globals for PUT and DELETE

From: Date: Wed, 15 Oct 2014 23:30:49 +0000
Subject: Re: New globals for PUT and DELETE
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-78102@lists.php.net to get a copy of this message
2014-10-16 2:13 GMT+03:00 Stas Malyshev <smalyshev@sugarcrm.com>: > > I tried this script, if you do POST, your data is in $_FILES, if you do > PUT, your data is in php://input. Still not sure what is the big problem. I added the variable field, how do I get its value, with use the query method PUT and enctype="multipart/form-data"? This debate not for tediousness, this is a real problem, if you want to use the query method PUT and enctype="multipart/form-data", variable $_POST is empty and file_get_contents('php://input') is empty <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { var_dump(file_get_contents('php://input')); exit; } ?><html> <body> <form method="POST" enctype="multipart/form-data"> <input type="hidden" name="key" value="value"> <input type="file" name="file"> <hr> <button>POST</button> </form> </body> </html>

« previous php.internals (#78102) next »