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出错的,继续找找其他地方有没有语法错误吧,跟着错误提示走就行了 vs2010 创建PHP 为什么浏览不了 php实现新网api接口 smarty连接数据库出错~~ PHP中数据库查询并显示 PHP的弱弱问题。。。 php的问题! 关于php中gettext的用法? 高手help me!!!(大家看我写这贴子如此辛苦, 求解如此急切, 都来看看, 来者有分)( php格式的网页上传问题 PHP如何调用百度云PCS的实现在客户端上传文件 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出错的,继续找找其他地方有没有语法错误吧,跟着错误提示走就行了