Do I need a !DOCTYPE declaration in a php file with html?

前端 未结 10 1101
面向向阳花
面向向阳花 2020-12-15 03:16

I have a php file with my website content in it. The file needs to be .php because i get some variables first and then use it later in the website content. Like this example

10条回答
  •  有刺的猬
    2020-12-15 03:43

    PHP really has nothing to do with HTML - it's just the server-side code spitting out a bunch of text that the browser interprets.

    A doctype is a critical part of how the browser interprets the HTML that follows.

提交回复
热议问题