How to enable PHP short tags?(如何启用 PHP 短标签?)
问题描述
我在 Linux 服务器上有一个以 <?
I have a web application on a Linux server which starts with <?
我需要将此应用程序复制到 Windows 环境中,并且一切正常,只是 SQL 语句的呈现方式不同.我不知道这是否与以 <?php 而不是 <? 开头的脚本有关,因为我不知道从哪里启用 <<? 来自 PHP.ini 所以我将其更改为 <?php
I needed to copy this application to a windows environment and everything is working fine except that an SQL statement is being rendered differently. I don't know if this has to do with the script beginning with <?php instead of <? because I don't know from where to enable the <? from the PHP.ini so I changed it to <?php
我知道这 2 个语句的含义应该相同,但我需要使用 <? 对其进行测试,以确保应用程序完全相同.这样我可以排除另一种可能性.
I know that these 2 statements are supposed to mean the same but I need to test it with <? in order to ensure that the application is exactly the same. This way I can eliminate another possibility.
谢谢
推荐答案
设置
short_open_tag=On
在 php.ini
然后重新启动您的 Apache 服务器.
And restart your Apache server.
这篇关于如何启用 PHP 短标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何启用 PHP 短标签?
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
