日期:2014-05-17  浏览次数:20461 次

fatal error 网上找的答案都解决不了
错误提示:
Fatal error: Call to undefined function queryMysql() in E:\xampp\htdocs\business\include\days_mgmt.php on line 7
代码:
PHP code

<?php
if(isset($_POST['btn_add'])&&$_POST['btn_add']=="Add Day")
{
    $day=$_POST['txt_day'];
    $day_no=$_POST['txt_day_no'];
    $query="INSERT INTO TRADING_DAYS_CONTAINER (days_no, days) VALUES ('$day_no', '$day')";
    $result=queryMysql($query); //这里的queryMysql()就是mysql_query()
    if($result)
    {
        header("Location:admin_trading.php?class=days_mgmt");
    }
}
?>


我没有自己配置php mysql环境,是下载的XAMPP。
关键是,我都写了好几个月了,一直这么写的,都没出现这个问题,应该不是配置问题吧!
queryMysql()是lib/function.php里面的,我在开头也include了。

搞死了,这是怎么回事????大大们!

------解决方案--------------------
那你在
<?php 后
$result=queryMysql($query); 前
加一句 print_r(get_included_files()); 

看看 lib/function.php 是否在其中