已有40人关注
session中class 类无法继承
发表在PHP图书答疑 2017-05-21
是否精华
版块置顶:

14.gif

php开发实例大全(基础卷)15章586-625

分享到:
精彩评论 5
慕容st
学分:6001 LV13
TA的每日心情
开心
2016-11-08 12:40:45
2017-05-21
沙发

您好,麻烦发下index.php的内容

huasheng
学分:204 LV4
2017-05-22
板凳

<?php

require_once 'header.php';


if(!isset($_GET['cctype']) || $_GET['cctype']==''){ //判断变量值是否为空

$cctype='1'; //为变量赋值

}else {

$cctype = $_GET['cctype'];

}

$smarty->assign('cctype', $cctype); //将变量值赋给模板变量

//查询图书大类中的数据

$bigtypes = $adminDB->executeSQL("select id, typename from tb_bigtype order by addtime", $connID);

$smarty->assign('bigtypes', $bigtypes);

//查询图书小类中的数据

$smalltypes = $adminDB->executeSQL("select id, typename, bigtypeid from tb_smalltype order by addtime", $connID);

$smarty->assign('smalltypes', $smalltypes);


$newBookinfos = $adminDB->executeSQL("select id, bookname, oldprice, newprice, bookimg from tb_bookinfo where isnew=1 order by addtime desc limit 0, 6", $connID);

$smarty->assign('newBookinfos', $newBookinfos);


$sepBookinfos = $adminDB->executeSQL("select id, bookname, oldprice, newprice, bookimg from tb_bookinfo where issepprice=1 order by addtime desc limit 0, 6", $connID);

$smarty->assign('sepBookinfos', $sepBookinfos);


$hotSellBookinfos  = $adminDB->executeSQL("select id, bookname, oldprice, newprice, bookimg from tb_bookinfo where ishotsell=1 order by addtime desc limit 0, 6", $connID);

$smarty->assign('hotSellBookinfos', $hotSellBookinfos);


$reads = $adminDB->executeSQL("select tb_read.id as readid, tb_read.filename, tb_bookinfo.id as bookid, tb_bookinfo.bookname, tb_bookinfo.oldprice, tb_bookinfo.newprice, tb_bookinfo.bookimg, tb_bookinfo.about from tb_bookinfo, tb_read where tb_read.bookinfoid = tb_bookinfo.id order by tb_read.downtimes desc limit 0, 2", $connID);

$smarty->assign('reads', $reads);


$terms = $adminDB->executeSQL("select tb_bookinfo.id, tb_bookinfo.bookname, tb_bookinfo.oldprice, tb_bookinfo.newprice, tb_bookinfo.bookimg, tb_bookinfo.about, tb_pub.pubname from tb_bookinfo, tb_pub where tb_bookinfo.isterm=1 and tb_bookinfo.pubid = tb_pub.id order by tb_bookinfo.addtime desc limit 0, 2", $connID);

$smarty->assign('terms', $terms);


$pubs = $adminDB->executeSQL("select id, pubname ,pubimg from tb_pub order by addtime desc limit 0, 6", $connID);

$smarty->assign('pubs', $pubs);


$tells = $adminDB->executeSQL("select id, title ,addtime from tb_tell order by addtime desc limit 0, 8", $connID);

$smarty->assign('tells', $tells);


$cxsxs = $adminDB->executeSQL("select id, title ,addtime from tb_cxsx order by addtime desc limit 0, 8", $connID);

$smarty->assign('cxsxs', $cxsxs);


$mrbooktjs = $adminDB->executeSQL("select id, bookname, bookimg, oldprice, newprice, about from tb_bookinfo where ismrbooktj=1 order by addtime desc limit 0, 3", $connID);

$smarty->assign('mrbooktjs', $mrbooktjs);


$mrbookph = $adminDB->executeSQL("select id, title from tb_mrbookph order by addtime desc limit 0, 6", $connID);

$smarty->assign('mrbookph', $mrbookph);


//

$system = $adminDB->executeSQL("select bookimgurl, readurl, ggurl from tb_system where mark = 1", $connID);

$smarty->assign('system', $system);

//

if(isset($_SESSION['unc']) && $_SESSION['unc']!='')

{

    $isLogin = 'T';

}

else

{

    if(isset($_SESSION['toUrl']))

    {

        unset($_SESSION['toUrl']);

    }

    $_SESSION['toUrl'] = 'usercenter.html';

    $isLogin = 'F';    

}

$smarty->assign('isLogin', $isLogin);

//


$smarty->display('index.phtml');

require_once 'footer.php';


慕容st
学分:6001 LV13
TA的每日心情
开心
2016-11-08 12:40:45
2017-05-24
地板

您好,该实例需要自行下载Smarty组件,之后将libs文件夹中的内容 拷贝到library/smarty文件夹当中,该实例使用的是smarty2.6版本

huasheng
学分:204 LV4
2017-05-25
4L

考过去了,问题依然存在

huasheng
学分:204 LV4
2017-05-25
5L

未拷文件之前是显示路径引用有无,拷完之后才显示无法识别smarty类的,要多费心啊,谢谢

首页上一页 1 下一页尾页 5 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照