开发者社区 问答 正文

php中header执行后没有输出

<?php
$testStr = "aaa";
$testStr = "ccccccccc";
header("HTTP/1.1 304 Not Modified"); 
echo $testStr;
?>

为什么我的的代码会没有输出

展开
收起
小旋风柴进 2016-03-05 16:29:29 2183 分享 版权
1 条回答
写回答
取消 提交回答
  • header放在第一行,header前边不能有任何的输出,包括空格也不行。

    2019-07-17 18:53:43
    赞同 展开评论
问答分类:
PHP
问答地址: