Heim  >  Artikel  >  Backend-Entwicklung  >  PHP起点-PHP标记风格

PHP起点-PHP标记风格

WBOY
WBOYOriginal
2016-06-23 14:29:521041Durchsuche

所谓标记,就是为了便于与其他内容区分所使用的一种特殊符号,PHP共支持4种标记风格,Look一下.

1.XML标记风格

1 <?php2 echo "this is xml style";3 ?>

XML风格以标记结束. 中间书写PHP代码. 这是书写PHP脚本最常用的标记风格. 见意大家用这种风格.

2.简短标记风格

1 <?2 echo "this is short tag style";3 ?>

这是短标记风格, 有也很多phper用这种风格, PHP安装完以后短标记风格默认开启状态. 若想关闭掉可以在配置文件php.ini (C:\WINDOWS\php.ini)中设置short_open_tag = off

3.脚本标记风格

1 <script LANGUAGE="php">2 echo "this is script style";3 </script>

脚本标记风格, 以结束;

4.asp标记风格

1 <%2 echo "this is asp style";3 %>

以标记结束. 若要关闭掉asp标记风格可配置php.ini文件asp_tags = off

 

 

 

 

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn