开发者

Raw jpg post from flash to php. How to save the jpg image? The image is corrupted

开发者 https://www.devze.com 2023-03-07 03:35 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号