Warning: Smarty error: unable to read resource: "" in /var/vhost/zsti/www/lib/Smarty/Smarty.class.php on line 1093
请问这个主要是什么问题:
这是我写的php页面
<?
require("init.php");
require("init_s.php");$table = "attach,content ";
$orderby= "date DESC";$wheres =" content.content_id=attach.content_id AND NOT filename LIKE '%jpg' AND NOT filename LIKE '%gif' AND NOT filename LIKE '%png' AND NOT filename LIKE '%bmp'";
/*
if(is_array($CHANNEL_IDS)){ //传递过来的是频道的ID变量
$wheres[] = "channel_id IN (".implode(",",$CHANNEL_IDS).")";
}elseif($_GET['content_id']){ //传递过来的是内容的ID变量 $wheres[] = "content_id=".$_GET['content_id'];}
*/
//搜索选项
/*
if($search = $_GET['search1']){
$field = $_GET['field']?$_GET['field']:"title";
if($_GET['search_type']=="like")
$wheres.= " AND $field like '%$search%'";
else
$wheres.= " AND $field = '$search'";
}
*/
/*
if($wheres)$where = implode(" AND ",$wheres);
else $where = "1";
*/
//先检查一下当前频道有多少条内容
$num = n_fetch("SELECT attach.path,attach.date,attach.content_id,attach.thumb_id,attach.filename,attach.thumb_id,attach.attach_order,content.title FROM $table where $wheres");
require_once("lib/page.inc.php");
$p = new show_page; //建立新对像
$p->set($NPP,$num); //设置相关参数,共三个,分别为'页面大小'、'总记录数'、'当前页(如果为空则自动读取GET变量)'$sql = "SELECT attach.path,attach.date,attach.content_id,attach.thumb_id,attach.filename,attach.thumb_id,attach.attach_order,content.title FROM $table WHERE $wheres ORDER BY $orderby LIMIT ".$p->limit();
//echo $sql;
$CONTENTs = s_fetch($sql);if($CONTENTs){ //List.html $smarty->assign("num_all",$num);
$smarty->assign("page",$p->output(1)); $smarty->assign("contents",$CONTENTs);
/*---------这个没有用了,模板页已经注释了-------
if($CHANNEL_ID){
$smarty->assign("channel",get_channel($CHANNEL_ID));
}elseif($search){
$channel['channel_name'] = "搜索结果";
$smarty->assign("channel",$channel);
}
*/
$smarty->display("list1.html");
}else{ $CONTENT['title'] = "内容不存在。";
$smarty->assign("content",$CONTENT);
$smarty->display("show1.html");
}
?>急求111111
请问这个主要是什么问题:
这是我写的php页面
<?
require("init.php");
require("init_s.php");$table = "attach,content ";
$orderby= "date DESC";$wheres =" content.content_id=attach.content_id AND NOT filename LIKE '%jpg' AND NOT filename LIKE '%gif' AND NOT filename LIKE '%png' AND NOT filename LIKE '%bmp'";
/*
if(is_array($CHANNEL_IDS)){ //传递过来的是频道的ID变量
$wheres[] = "channel_id IN (".implode(",",$CHANNEL_IDS).")";
}elseif($_GET['content_id']){ //传递过来的是内容的ID变量 $wheres[] = "content_id=".$_GET['content_id'];}
*/
//搜索选项
/*
if($search = $_GET['search1']){
$field = $_GET['field']?$_GET['field']:"title";
if($_GET['search_type']=="like")
$wheres.= " AND $field like '%$search%'";
else
$wheres.= " AND $field = '$search'";
}
*/
/*
if($wheres)$where = implode(" AND ",$wheres);
else $where = "1";
*/
//先检查一下当前频道有多少条内容
$num = n_fetch("SELECT attach.path,attach.date,attach.content_id,attach.thumb_id,attach.filename,attach.thumb_id,attach.attach_order,content.title FROM $table where $wheres");
require_once("lib/page.inc.php");
$p = new show_page; //建立新对像
$p->set($NPP,$num); //设置相关参数,共三个,分别为'页面大小'、'总记录数'、'当前页(如果为空则自动读取GET变量)'$sql = "SELECT attach.path,attach.date,attach.content_id,attach.thumb_id,attach.filename,attach.thumb_id,attach.attach_order,content.title FROM $table WHERE $wheres ORDER BY $orderby LIMIT ".$p->limit();
//echo $sql;
$CONTENTs = s_fetch($sql);if($CONTENTs){ //List.html $smarty->assign("num_all",$num);
$smarty->assign("page",$p->output(1)); $smarty->assign("contents",$CONTENTs);
/*---------这个没有用了,模板页已经注释了-------
if($CHANNEL_ID){
$smarty->assign("channel",get_channel($CHANNEL_ID));
}elseif($search){
$channel['channel_name'] = "搜索结果";
$smarty->assign("channel",$channel);
}
*/
$smarty->display("list1.html");
}else{ $CONTENT['title'] = "内容不存在。";
$smarty->assign("content",$CONTENT);
$smarty->display("show1.html");
}
?>急求111111
{
trigger_error("Smarty error: $error_msg", $error_type);
}
{
trigger_error("Smarty error: $error_msg", $error_type);
}
这就是那一行的代码