Home > Backend Development > PHP Tutorial > Introduction to 4 markup styles in http://www.56.com/m2v/?magic=1 php

Introduction to 4 markup styles in http://www.56.com/m2v/?magic=1 php

WBOY
Release: 2016-07-29 08:48:37
Original
1160 people have browsed it

When I was reading the forum today, I saw an error code from a newbie. After looking at it for a long time, I didn't find the error. What am I wondering? (Why is this?) Haha.
The mark problem was discovered later, he was using short marks. And it is not enabled in my php.in configuration. Oh, I’m so ashamed!
1.xml style (standard style recommended)

Copy the code The code is as follows:


echo "This is an xml style tag";
?>


xml style The tag is a commonly used tag and a recommended tag. The server cannot disable it. This style of tag can be used in xml and xhtml.
2. Script style

Copy the code The code is as follows:




3 .Short style

Copy codeThe code is as follows:




Note: You need to set short _open_tag=on in php.ini, the default is on , or add the –enable-short-tags option when compiling PHP. (PHP 3 version can also activate the use of short tags through the short_tags() function.)
4.asp style

Copy code The code is as follows:


<%
echo 'This is an asp style tag';
%>


Note: asp_tags = on needs to be turned on in the php.ini configuration file;
The above asp style and short style need to be set in php.ini. Not supported by default.
Note: Support for ASP style markup was added in version 3.0.4.
Note: Avoid using short tags in the following situations: developing programs or libraries that need to be distributed, or developing on servers that are not controlled by the user. Because the target server may not support short tags. For code portability and distribution, make sure not to use short tags.

The above has introduced the four markup styles in http://www.56.com/m2v/?magic=1 php, including the content of http://www.56.com/m2v/?magic=1 , I hope it will be helpful to friends who are interested in PHP tutorials.

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