Tags in programming languages are strings added to the source code for identification. Most languages treat tags as identifiers, followed by a colon for identification.
##In PHP we use Exit PHP mode. Most embedded scripting languages are embedded in HTML in this mode, such as CSS, ASP, JSP, JS, etc.
You can turn PHP mode on or off in the HTML file like this according to your needs.
When PHP parses a file, it will look for start and end flags to tell PHP to start and stop interpreting the code in it. When PHP encounters the end mark, it will simply output the following content as is, so any number of PHP tags can be embedded in an HTML document.
Note:
Files containing only php scripts do not allow the end mark?> to exist. This can prevent the end from being accidentally injected, resulting in Failure occurs when using functions such as header(), setCookie(), session_start(), etc. to set header information.
Cause: When a php file loads another php file, what if the end flag of the file? If there is a space " " at the end of >, then an error will occur when using the function to set the header information after loading the file. Because these functions do not allow preceding spaces. In addition, these scripts containing the end mark will output the end mark as is? >The space after.
Spaces within PHP tags will be automatically ignored during interpretation.
The above is the detailed content of What is the php language tag?. For more information, please follow other related articles on the PHP Chinese website!
Statement: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