我们今天要向大家介绍的是关于1、 PHP脚本有四种标记: 短标签和asp标签虽方便但移植性及发行性较差,通常不推荐。此外注意如果将 PHP 嵌入到 XML 或 XHTML 中则需要使用标准标签 以保持符合标准。
A, 标准标签:
B, 脚本标签:…
C, 短标签: 需要在php.ini中设置short _open_tag=on,默认是on,或者在 PHP 编译时加入了 –enable-short-tags 选项。(PHP 3版本还可以通过 short_tags() 函数激活使用短标记。)
D, asp标签(PHP 3.0.4 版后支持): 需要在php.ini中设置asp_tags=on,默认是off
2, PHP脚本指令分隔符: 同 C,java 或 Perl 一样,PHP 需要在每个语句除末行(因为结束标记隐含表示了一个分号 )后用分号结束指令。而文件末行省略分号有利于使用输出缓冲和 include() 或者 require()
3, PHP脚本注释: PHP 支持 C,C++ 和 Unix Shell 风格(Perl 风格)的注释。例如:
单行注释:// ,#
多行注释:/* */
<ol class="dp-xml"> <li class="alt"><span><span class="tag"><span> ?php </span></span></span></li> <li><span>echo "This is a test"; // 单行注释 (c++ 风格), </span></li> <li class="alt"> <span>/* 多行注释:单行注释说明1:"// </span><span class="tag">?></span><span>"中 </span><span class="tag">?></span><span>有效, </span> </li> <li> <span>单行注释说明2:"// </span><span class="tag"><span> /script</span><span class="tag">></span><span>"中 </span><span class="tag"><span> /script</span><span class="tag">></span><span>无效 */ </span></span></span> </li> <li class="alt"><span>echo "This is yet another test"; </span></li> <li><span>echo "One Final Test"; # 单行注释 (shell风格) </span></li> <li class="alt"> <span class="tag">?></span><span> </span> </li> </ol>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver CS6
Visual web development tools