Why would one omit the close tag?

前端 未结 14 1554
旧巷少年郎
旧巷少年郎 2020-11-21 06:18

I keep reading it is poor practice to use the PHP close tag ?> at the end of the file. The header problem seems irrelevant in the following context (and this

14条回答
  •  死守一世寂寞
    2020-11-21 07:13

    "Is there another good reason (other than the header problem) to skip the ending php tag?"

    You don't want to inadvertently output extraneous whitepace characters when generating binary output, CSV data, or other non-HTML output.

提交回复
热议问题