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
解决方案 »
- 请问Zend Studio 如何调用外部浏览器??
- 怪事,dede:php 标签不起作用了
- QQ登录已经开放,谁能整合QQ登陆啊!
- php 页面显示 web虚拟服务器 花生壳建站
- Apache不认识PHP正则和字符串查找中的换行,具体请看贴内代码,请教
- rawurlencode和urlencode分别应该在什么场合使用?请指点。
- 求个简单的正则表达式写法^_^
- 简单的问题,如何建立php的运行环境呀,我修改的网站总是要上传到虚拟主机上才能完整的浏览到,在本机上用IE看不到
- 关于php用foreach获取复选框内容和javaScript冲突问题?
- ActiveX与php的问题!
- 如何进行多文件上传?新手求助
- 请教变量名动态问题。
{
trigger_error("Smarty error: $error_msg", $error_type);
}
{
trigger_error("Smarty error: $error_msg", $error_type);
}
这就是那一行的代码