一。uchome的缓存目录 ---------data此目录要有777权限(1)模板文件缓存机制1:在要显示的页面通过include template($name) 语句来包含被编译后的模板文件2:template($name)函数解释3:模板文件编译:parse_template($tpl) 传递的参数:为不包含文件类型后缀的完整文件路径 函数功能:替换掉模板标签,使其编译成PHP代码(2)模块数据缓存1:管理员在后台可以设置是否进行模块缓存,以及文本模式缓存还是储存到数据库,同时还可以设置时储存到一个表还是多个表中。若选在储存在数据库中,则被保存于cache cahe1 chae2 这.. Read More
posted @ 2013-10-26 23:27 等风来。。 Views(419) Comments(0) Diggs(0)
一。inserttable//添加数据//前3个参数 $tablename插入的表名称 $insertsqlarr数据数组 $returnid是否返回插入ID function inserttable($tablename, $insertsqlarr, $returnid=0, $replace = false, $silent=0) { global $_SGLOBAL; $insertkeysql = $insertvaluesql = $comma = ''; foreach ($insertsqlarr as $insert_key => $insert_val Read More
posted @ 2013-10-26 22:41 等风来。。 Views(208) Comments(0) Diggs(0)
$_SC: Array( [dbhost] => localhost [dbuser] => root [dbpw] => root [dbcharset] => utf8 [pconnect] => 0 [dbname] => uchome [tablepre] => uchome_ [charset] => utf-8 [gzipcompress] => 0 [cookiepre] => uchome_ [cookiedomain] => [cookiepath] => / [attachdir] => ./at Read More
posted @ 2013-10-26 16:53 等风来。。 Views(238) Comments(0) Diggs(0)
Feed,本意是“饲料、饲养、(新闻的)广播等”。我们就拿用户发表日志这个动作来简单看看Uchome的feed机制。用户发布日志所使用的函数是 source/function_blog.php文件里的blog_post()函数用户发表日志成功后会调用source/function_feed.php文件里的feed_publish($id, $idtype, $add=0)函数来产生feed产生feed的方式很简单,根据不同的idtype来得到不同的feed类型,根据add来判断是插入新的feed还是更新feed然后将feed信息 与用户ID 一起写入feed表中。显示feed就更简单了,首.. Read More
posted @ 2013-10-26 16:41 等风来。。 Views(283) Comments(0) Diggs(0)
------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------