The following code recently started returning empty strings. It works on other systems, so it doesn't appear to be a problem with the code itself. I literally eliminated all of the server-side code, and it still did the same thing. I also tried using file_get_contents to no avail, just kind of shooting in the dark.
$fileStream = fopen('php://input', 'rb');
$fileData = '';
while ($buffer = fread($fileStream, 4096)) {
$fileData .= $buffer;
}
Server: Zend Server 5.1.0 (Apache 2.2.3)
Language: PHP 5.3.5
Front-End: Plupload (JavaScript plugin)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…