Home  >  Q&A  >  body text

?>What does it mean?

Every time I see the code saying ?>, what does it mean? Does it mean that the above code has been written?

YwyYwy2383 days ago4189

reply all(4)I'll reply

  • hello world

    hello world2018-05-08 10:11:59

    It must be written when nested in html. But in pure PHP, such as controllers, it is better not to write anything. Even if you have to write it, don’t leave a space at the end of ?>. Otherwise, an error may be reported

    reply
    0
  • 灭绝师太

    灭绝师太2018-05-04 15:52:48

    If it is a php file, you can omit the end character. When inserting it into html, you need to write all

    reply
    1
  • 灭绝师太

    灭绝师太2018-05-04 11:44:47

    <?php //Start character

    ?>//End character

    reply
    1
  • Ywy

    OK, thanks

    Ywy · 2018-05-04 11:45:56
    MrSwan

    Master, sometimes you don’t write?>You won’t get an error, so is it better to write or not to write?

    MrSwan · 2018-05-04 12:16:35
  • Cancelreply