What does php end with?

王林
Release: 2023-02-24 16:50:01
Original
5522 people have browsed it

What does php end with?

We know that php files have the starting symbol . The starting symbol is necessary, but the ending symbol cannot be used indiscriminately.

When PHP is embedded in an HTML page, the terminator is necessary to distinguish code blocks. It is not recommended to add it at other times. If this is a program included by others, without this end character, many, many problems can be reduced.

For example: header,setcookie, session_startThere must be no output before these actions. If you accidentally add ?> after Visible characters (extra spaces, newlines), etc. that damage the page display will cause a "Header already sent" error. If you don't write it, you won't have this problem.

Example:

What does php end with?

What does php end with?

What does php end with?

What does php end with?

##The above content is for reference only!

Recommended tutorial:

PHP video tutorial

The above is the detailed content of What does php end with?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!