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.