2

所以,我有 2 个 PHP 文件,index.php并且include.php.

index.php

<?php
include ('include.php');
?>

include.php

<?
$a = 1>0;
echo "test";

当我跑步index.php时,我得到的是

0; echo "test";

当 ths include.php 使用短打开标签时会发生这种情况,有人知道问题出在哪里吗?

我正在使用 PHP 5.4.16

4

1 回答 1

0

尝试在 .htaccess 中添加它

<IfModule mod_php5.c>
   php_value short_open_tag 1
 </IfModule>

或在 php.ini 中设置

short_open_tag = On
于 2015-12-14T03:40:46.850 回答