2014-10-16 2:13 GMT+03:00 Stas Malyshev <smalys...@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>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to