0
为什么会输出一个0字节的文件?JSON file_get_contents空文件
<?php
$jsonurl = "http://do.convertapi.com/Web2Pdf/json/?curl=http://stackoverflow.com/";
$json = file_get_contents($jsonurl,0,null,null);
$json_output = json_decode($json);
file_put_contents('converted.pdf', $json_output);
?>
十分感谢,该文件现在是正确的大小,但我的PDF阅读器说,这是一个损坏的文件。有任何想法吗? – Kratos
对不起..离开base64_decode。忽略我最后的评论,因为它完美地工作。再次感谢ioseb。 – Kratos
np,很高兴它为你工作:) – ioseb