推荐一款PHP+jQuery制作的列表分页的功能模块(7)
style1.css: #page a.pagenum{ margin-left:3px; margin-right:3px; padding:1px 7px; border:1px solid #ccc;}#page a.pagenum:hover{ background-color:#95071b; color:#fff;}.selected{ background-color:#95071b
style1.css:
#page a.pagenum{ margin-left:3px; margin-right:3px; padding:1px 7px; border:1px solid #ccc; } #page a.pagenum:hover{ background-color:#95071b; color:#fff; } .selected{ background-color:#95071b; color:#fff; }
init.inc.php:
<?php /** file:init.inc.php Smarty对象的实例化及初始化文件 */ /* *********************Smarty设置*********************** */ //根目录路径方式,用于Smarty设置 define("ROOT",str_replace("\\","/",dirname(__FILE__))."/"); require ROOT.'libs/Smarty.class.php'; $smarty = new Smarty(); //Smarty3设置默认路径 $smarty ->setTemplateDir(ROOT.'templates/') ->setCompileDir(ROOT.'templates_c/') ->setPluginsDir(ROOT.'plugins/') ->setCacheDir(ROOT.'cache/') ->setConfigDir(ROOT.'configs'); $smarty->caching = false; $smarty->cache_lifetime = 60*60*24; //模版缓存有效时间为1天 $smarty->left_delimiter = '<{'; $smarty->right_delimiter = '}>'; /***********************************************************/ //根目录url方式 $PHP_SELF=$_SERVER['PHP_SELF']; $ROOT_URL='http://'.$_SERVER['HTTP_HOST'].substr($PHP_SELF,0,strrpos($PHP_SELF,'/')+1); define(ROOT_URL,$ROOT_URL); //模版目录url方式 define("Template_Dir",$ROOT_URL.'templates');
代码下载地址:https://github.com/dee0912/PageClass
- 上一篇:PHP+jQuery 注册模块开发详解
- 下一篇:php中动态修改ini配置
精彩图集
精彩文章