Home > Backend Development > PHP Tutorial > 学习php之二:PHP的标记风格

学习php之二:PHP的标记风格

WBOY
Release: 2016-06-23 14:30:04
Original
943 people have browsed it


1.XML风格的PHP标记

 

                  <p class="sycode">                 1      <?     PHP     2      echo      “这是XML风格的PHP标记”;     3      ?>                  </p>
Copy after login

  XML风格的标记是整个PHP编程过程中最为常用的一类标记,该种风格的标记在XML和XTML中都可以使用。

  建议新手的朋友也使用这种标记。


2.脚本风格的PHP标记

                  <p class="sycode">                 1      <     script language     =     ”PHP”     >          2            echo      “这是脚本风格的PHP标记”;     3      </     script     >                  </p>
Copy after login

3.简短风格的PHP标记

                  <p class="sycode">                 1      <?           echo      “这是简短风格的PHP标记”;      ?>                  </p>
Copy after login


4.ASP风格的PHP标记

                  <p class="sycode">                 1      <%          2      echo      “这是ASP风格的PHP标记“;     3      %>                  </p>
Copy after login


注:使用简短风格和ASP风格需要配置php.ini文件。

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