Is there harm in outputting html vs. using echo?

前端 未结 4 1706
梦毁少年i
梦毁少年i 2020-12-21 11:13

I have no idea really how to say this, but I can demonstrate it:

Content Title\";
}
?>

4条回答
  •  眼角桃花
    2020-12-21 11:35

    I appreciate all the feedback. :)

    I did find out some issues when using the two different methods.

    There does not appear to be any real issue here except that the formatting looks terrible on the source and the tedious nature of it.

    Content Title";
    }
    ?>
    

    Using php this way can cause an error as such Warning: Cannot modify header information - headers already sent

    
    

    Content Title

    The headers error can possibly be solved by using php like so

    
    

    Content Title

    As to why and when the headers are sent, I am not completely sure...

提交回复
热议问题