php - file_put_contents uploads 6KB zip which is damaged -
i receiving zip url ajax php script. if directly put url browser tab downloads file if use php script file_put_contents generates 6kb file actual file size 48kb. when try extract, shows error file damaged.
here php code:
$url = "http://localhost/web/?_task=mail&_action=get&_mbox=inbox&_uid=4&_token=limzjjecew7mbtjm2qen29vpd3yt2m7t&_part=1&_download=1"; $content = file_get_contents($url); $name = 'mark.zip'; file_put_contents($name, $content);
Comments
Post a Comment