当前位置:网站首页>short_ open_ Tag short open label must be opened
short_ open_ Tag short open label must be opened
2022-04-21 17:16:00 【L.Cheng】
Today in my CentOS VPS Upper use <?= ?> Instruction pair template PHP When files are exported directly , I found that I couldn't output , So find the reason , Find out CentOS Of php.ini The function of short open label will be turned off by default (Short Open Tag), That is, you can't use <? ?> label , Just reopen the short open label .
about PHP 5.4 Previous versions , If the short open label is closed , It can't be used anymore <?= ?> It's output , And for PHP 5.4+, Whether the short open label function is turned off or not , You can use <?= ?> For the output .
Specifically CentOS Why do developers want to turn off short open tags in the default configuration , Maybe it's because of the short open label and XML The reason for the file header conflict (<?xml version="1.0"?>).
Personally feel , To write AJAX In the process , Use JSON Instead of XML It's much more convenient .
In the execution of the project php China Daily syntax error, unexpected end of file in This mistake , We often check whether there is a lack of punctuation and so on .
however , The reason for using the editor , With this error, the editor didn't give feedback , and , Also checked the code carefully , No problem .
At this time, we should think about whether there are problems elsewhere .
New company , stay php The file uses php Segment label for , It's very common . however , The new environment does not necessarily support it .
modify php.ini file :
short_open_tag = Off by on
short_open_tag effect :
stay php Configuration file for (php.ini) There is one of them. short_open_tag Value , You can use PHP Segment label for :(<? ?>).
meanwhile , You can only use it if you turn it on <?= In place of <? echo . stay CodeIgniter This is the way used in the video tutorial of .
But this short label is not recommended , Use <?php ?> Is the standard method . Just because this short label takes a long time , This feature has been preserved .
版权声明
本文为[L.Cheng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211706161461.html
边栏推荐
- No more simple intention lock
- 干货 | 实战演练基于加密接口测试测试用例设计
- wx-open-launch-weapp 样式问题
- Image Manipulation Detection by Multi-View Multi-Scale Supervision
- 在阿里云上搭建个人博客(WordPress)
- R language uses the label function of hmisc package to add variable labels for specific variables (data columns) in dataframe, modify the data column name of dataframe to data description label, and a
- 【ACM/webank】#491.递增子序列(使用HashSet来记录并防止重复子序列)
- 不同环境下控制@Schedule 开启
- BUUCTF WEB [网鼎杯 2018]Fakebook
- Quick MTF,镜头图像质量测试应用程序
猜你喜欢

Quick MTF, lens image quality test application

FastReport Business Graphics .NET

SSD_Resnet 飞机与油桶数据集实战

.NET宝藏API之:IHostedService,后台任务执行

Precautions for MySQL aliasing database tables

pytorch index_ add_ Usage introduction

Vitis HLS build project and generate IP core (vivado HLS)

【动态规划】152. 乘积最大子数组

第118章 SQL函数 REVERSE

Chapter 118 SQL function reverse
随机推荐
【ACM/webank】#491.递增子序列(使用HashSet来记录并防止重复子序列)
LS - Al meaning of each field
Do you need to set the socket to non blocking when using epoll?
[machine learning] gating cycle unit
正在考虑微服务架构的松耦合?小心这些陷阱
二叉树相关的创建或者遍历
【免费】某平台19860元编程课程资料下载,仅此1次
JVM 从入门到放弃之 ZGC 垃圾收集器
【面试普通人VS高手系列】能谈一下CAS机制吗?
FastReport Business Graphics .NET
Win10桥接网卡使得qemu虚拟机可以正常访问网络
查询2021年入职的非业务科员工的员工信息,各位同志们这个怎么编写SQL语句啊,求解
SSD_ RESNET aircraft and oil drum data set actual combat
redis事务的基本操作
Sword finger offer II 011 0 and 1 have the same number of subarrays
Microcomputer principle and interface technology -- electronic organ experiment report
【动态规划】152. 乘积最大子数组
Quick MTF, lens image quality test application
Win10 bridging network card enables QEMU virtual machine to access the network normally
Image Manipulation Detection by Multi-View Multi-Scale Supervision