关于 Http:header问题

bigman
//参数1: 网址
//只输入参数,可直接到到图片的数据, 可直接echo或输出到浏览器
$content = zhtml2img("http://www.baidu.com");
Http::header("Content-type: text/html; charset=utf-8");
Http::header('Content-type: image/jpg');
echo $content;

这段代码 只能被执行一次 第二次刷新网页 就不能输出图片了 这是为何?

3233 4 0
4个回答

keytehu

服务端debug模式运行,看看有没有啥报错吧

  • 暂无评论
bigman

  • 暂无评论
bigman

没有报错
只是 2次获取的$content不同

  • 暂无评论
bigman

找到了应该是baidu的策略问题!谢谢!

  • 暂无评论
年代过于久远,无法发表回答
🔝