紧急毕设 求助大家
补充资料
在搜索时发生了这样的错误
:
Fatal error: Call to a member function GetArray() on a non-object in D:\www\27\searchrst.php on line 18
然后我单独运行这个文件提示:
Fatal error: Smarty error: unable to write to $compile_dir 'D:\www\27\Smarty\templates_c'. Be sure $compile_dir is writable by the web server user. in D:\www\27\Smarty\Smarty.class.php on line 1092
这个文件的源代码是:
<?php
include_once 'conn/conn.php';
include_once 'config.php';
$act = $_GET['act'];
if($act == "simple"){
$cont = $_GET['cont'];
if(!empty($_GET['cont'])){
$sql = "select * from tb_commo where name like '%".$cont."%'";
}
}else{
$name = $_GET['name'];
$model = $_GET['model'];
$class = $_GET['stype'];
$sql = "select * from tb_commo where name like '%".$name."%' and model like '%".$model."%' and class like '%".$class."%' ";
}
$rst = $conn->execute($sql);
$searcharr = $rst->GetArray();
$smarty->assign('searcharr',$searcharr);
$smarty->assign('title','查询结果');
$smarty->assign('total',$rst->RecordCount());
$smarty->display('searchrst.tpl');
?>
因为是毕设 很急 请大家帮帮我