当前位置:网站首页>"PHP Basics" tags in PHP
"PHP Basics" tags in PHP
2022-07-27 08:06:00 【Go home at night】
Functional requirements
Use different marking methods PHP Code to identify .
The sample code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>php Common marks in </title>
</head>
<body>
<?php echo " Use standard tag formats "; ?>
<br />
<? echo " Use short tag format ";?>
</body>
</html>Running results
Knowledge description
PHP Is an embedded scripting language , In the actual development, it is often associated with HTML The content is mixed together , To distinguish HTML and PHP Code , You need to use a tag pair PHP Code to identify .
<?php echo " Use standard tag formats "; ?>: Is a paragraph embedded in HTML Medium PHP Code . among “<?php” and “?>” yes PHP One of the marks , Specifically used to contain PHP Code ,echo Used to output one or more strings . Semicolon of the last statement before the closing tag “;” It can be omitted . This is a standard way of marking , Is the most commonly used tag type , The server cannot disable this style of markup .PHP This is the recommended way .
<? echo " Use short tag format ";?>: Short tag format in “<?” Start , With “?>” end . When use , Need to put php.ini Medium short_open_tag Option set to On, It can only be used after the short mark function is turned on .
Be careful : If the script contains XML sentence , Short marks should be avoided “<? ?>”, To select a standard tag “<?php ?>”. because “<?” yes XML A processing instruction of the parser , If the script contains XML Statement and use short tag format ,PHP Parsers may be confused XML Processing instructions and PHP Start marker .
边栏推荐
- 想让照片中的云飘起来?视频编辑服务一键动效3步就能实现
- 综合案例、
- The seta 2020 international academic conference will be held soon. Welcome to attend!
- SQL labs SQL injection platform - level 1 less-1 get - error based - Single Quotes - string (get single quote character injection based on errors)
- C commissioned use cases
- You may need an additional loader to handle the result of these loaders.
- JS存取cookie示例
- 一段平平无奇的秋招经历
- Shell scripts related
- Day111.尚医通:集成NUXT框架、前台页面首页数据、医院详情页
猜你喜欢

2020国际机器翻译大赛:火山翻译力夺五项冠军

Digital transformation driven by enterprise architecture!

Promise details

On data security

Sword finger offer 58 - I. flip word order

Day111. Shangyitong: integrate nuxt framework, front page data, hospital details page

SETTA 2020 国际学术会议即将召开,欢迎大家参加!

C#winform 窗体事件和委托结合用法

【目标检测】YOLOv6理论解读+实践测试VisDrone数据集

Day111.尚医通:集成NUXT框架、前台页面首页数据、医院详情页
随机推荐
CommonTitleBar hide left right
物联网工业级UART串口转WiFi转有线网口转以太网网关WiFi模块选型
Primary key in MySQL secondary index - MySQL has a large number of same data paging query optimization
Day111.尚医通:集成NUXT框架、前台页面首页数据、医院详情页
What is the real HTAP? (1) Background article
Modification case of Ruixin micro rk3399-i2c4 mounting EEPROM
Enhancement: BTE process introduction
2020国际机器翻译大赛:火山翻译力夺五项冠军
How to obtain the cash flow data of advertising services to help analyze the advertising effect?
Internet of things industrial UART serial port to WiFi to wired network port to Ethernet Gateway WiFi module selection
[golang] golang develops wechat official account web page authorization function
Development of three database general SQL code based on PG Oracle and MySQL
C语言:随机生成数+插入排序
Bash: sudo: command not found in container
Redison 3.17.5 release, officially recommended redis client
自动化测试的使用场景
Data extraction 2
物来顺应,未来不迎,当时不杂,既过不恋
10000 word parsing MySQL index principle -- InnoDB index structure and reading
如何在 60 秒内去分析和定位问题?