[英]issues when Include a php file using short tags
So, I have 2 PHP files, index.php
and include.php
. 所以,我有2个PHP文件,
index.php
和include.php
。
In index.php
在
index.php
<?php
include ('include.php');
?>
In include.php
在
include.php
<?
$a = 1>0;
echo "test";
When I run index.php
, what I get is 当我运行
index.php
,我得到的是
0; echo "test";
This happens when ths include.php is using short open tag, anyone knows what is the problem? 当include.php使用短打开标记时,就会发生这种情况,有人知道这是什么问题吗?
I am using PHP 5.4.16 我正在使用PHP 5.4.16
Try adding this in .htaccess 尝试将其添加到.htaccess中
<IfModule mod_php5.c>
php_value short_open_tag 1
</IfModule>
or Set in php.ini 或在php.ini中设置
short_open_tag = On
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.