Raw jpg post from flash to php. How to save the jpg image? The image is corrupted
I am getting a raw jpg post from flash into a php script and saving the image in a temp folder in the server. The image is saved, the size is correct, but when I try to open it I get an error message saying that it is corrupted.
Here is the php code that I a开发者_如何学Cm using:
<?php
$data = file_get_contents('php://input');
$result = file_put_contents("imagePathOntheServer/image.jpg",$data);
echo $result;
?>
Any ideas? Your help will be much appreciated.
精彩评论