如何启用 PHP 短标签? [英] How to enable PHP short tags?

查看:27
本文介绍了如何启用 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 短标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆