06 2012 档案
摘要:重定向Header("Location: http://url";); 禁止页面缓存header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' );header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );header( 'Cache-Control: no-store, no-cache, must-revalidate' );header( 'Cache-Control:
阅读全文
摘要:function HtmlEncode($fString){ if($fString!="") { $fString = str_replace( '>', '>',$fString); $fString = str_replace( '<', '<',$fString); $fStri
阅读全文
摘要:smarty日期使用案例$smarty = new Smarty;$smarty->assign('yesterday', strtotime('-1 day'));$smarty->display('index.tpl');index.tpl:{$smarty.now|date_format} //Sep 7, 2009{$smarty.now|date_format:"%A, %B %e, %Y"}{$smarty.now|date_format:"%H:%M:%S"}{$yesterday
阅读全文
摘要:$smarty = new Smarty;$smarty->assign('articleTitle', 'Two Sisters Reunite afterEighteen Years at Checkout Counter.');$smarty->display('index.tpl');index.tpl:{$articleTitle}{$articleTitle|truncate}{$articleTitle|truncate:30}{$articleTitle|truncate:30:""}{$artic
阅读全文
摘要:这里是一个使用日期函数的例子。下面的查询选择了所有记录,其date_col的值是在最后30天以内: DATE_FORMAT(FROM_UNIXTIME('1997-10-04 22:23:00'),'%Y/%m/%d')mysql> SELECT something FROM table WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30; DAYOFWEEK(date) 返回日期date的星期索引(1=星期天,2=星期一, ……7=星期六)。这些索引值对应于ODBC标准。 mysql> select
阅读全文
摘要:关键字:设为首页JS,加入收藏夹 js,加入收藏夹代码,设为首页代码,兼容火狐 加入收藏夹和设为首页,FF设为首页在一次设置中发现火狐浏览器(FF)不支持普通的象IE那样的加入收藏夹和设为首页,于是就找了关于FF的方法。后来测试了下,可以用了。。其代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="htt
阅读全文