如何启用PHP短标签? [英] How to enable PHP short tags?
问题描述
我在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
我知道这两个语句应该表示相同,但是我需要使用<?
对其进行测试,以确保应用程序完全相同.这样我就可以消除另一种可能性.
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屋!