php include 错误 真心不明白怎么回事,代码如下<?php if(file_exists('perform.php')) echo '3'; include 'perform.php'; echo "hi1"; if(isset($_POST['target']))perform($_POST['target']); ?>perform.php文件是存在的,但是页面显示3,不显示hi1求大神……!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpif(!file_exists('perform.php'))echo '3';include 'perform.php';echo "hi1";if(isset($_POST['target']))perform($_POST['target']);?> 问题不是这个啊&……主要是下面的include语句后面的语句不执行啊…… 问题在于……include下面的语句没有执行啊…… 那就要把perform.php的代码贴出来看看啊,会不会已经exit了 <?phpfunction perform($post){ echo "hi"; $conn=mysql_connect("localhost","plantSelectUser",null); mysql_select_db("test"); mysql_query("SET NAMES 'utf8'"); $result=mysql_query("select * from test where CnName='".$post."';"); foreach($bar as mysql_fetch_array($result)) echo '<div class="bar"><div class="text"><div class="title">'.$bar['Cn'].'</div>'.mysql_fetch_array(mysql_query($bar['La']))['formation'].'</div>'; if(file_exists('./DataXML/'.$bar['La'].'/photos.xml'))$photo=simplexml_load_file('./xml/ftpManager.xml'); echo'<img src="'.$photo->path[0].'">'; echo'</div>'; mysql_close($conn);}?>应求发……估计是出不来什么错误…… 你怎么确定没执行的。查看源码就知道了。注释掉include是什么情况 foreach($bar as mysql_fetch_array($result))反了foreach(mysql_fetch_array($result) as $bar) 你看,本来有个echo "hi1",但是这句话没有实现…… 这确实是错误……但是改了以后仍然没用……我觉得问题仍然在include那里…… 问题还是在你这个包含文件里,即使只是函数没有被执行,但是有一个地方出错也会导致include出错的,继续找找其他地方有没有语法错误吧,跟着错误提示走就行了 时间比较问题 求助一个对URL验证的正则表达式问题? php学习计划 如何实现确认后跳转,取消后不跳转 php導出excel文件 请问为什么提交的表单,而值却传不到下一页。 请教php安装问题!! 超菜鸟关于PHP窗体间互传数据问题 关于php的开放原码问题? 数据库语句中引号和点号代表什么意思 有没有好用一点的CMS?PHP语言的,要英文后台 php如何打印金字塔
if(!file_exists('perform.php'))
echo '3';
include 'perform.php';
echo "hi1";
if(isset($_POST['target']))perform($_POST['target']);
?>
主要是下面的include语句后面的语句不执行啊……
function perform($post){
echo "hi";
$conn=mysql_connect("localhost","plantSelectUser",null);
mysql_select_db("test");
mysql_query("SET NAMES 'utf8'");
$result=mysql_query("select * from test where CnName='".$post."';");
foreach($bar as mysql_fetch_array($result))
echo '<div class="bar"><div class="text"><div class="title">'.$bar['Cn'].'</div>'.mysql_fetch_array(mysql_query($bar['La']))['formation'].'</div>';
if(file_exists('./DataXML/'.$bar['La'].'/photos.xml'))$photo=simplexml_load_file('./xml/ftpManager.xml');
echo'<img src="'.$photo->path[0].'">';
echo'</div>';
mysql_close($conn);
}
?>
应求发……估计是出不来什么错误……
foreach($bar as mysql_fetch_array($result))
反了foreach(mysql_fetch_array($result) as $bar)
我觉得问题仍然在include那里……
问题还是在你这个包含文件里,即使只是函数没有被执行,但是有一个地方出错也会导致include出错的,继续找找其他地方有没有语法错误吧,跟着错误提示走就行了