joaner  

2011年8月7日

摘要: 通过传入数据库中存储的文章发表时的UNIX时间戳,来转化为例如 几分钟前,几小时前,几天前 这样的提示。如微博这看起来更加人性化,好吧,上代码 1 <?php 2 class timeAgo 3 { 4 static $timeagoObject; 5 private $rustle; 6 private $unit; 7 8 private function __construct() 9 {10 11 } 12 private function __clone(){ }13 public static function getObject()14 {15 if(! (self::$t 阅读全文
posted @ 2011-08-07 20:30 All right 阅读(698) 评论(0) 推荐(0) 编辑
 
摘要: 这算是草稿吧,很简单,稍后再去看一些session讲解。All right ,上代码 1 <?php 2 class session 3 { 4 static $sessionObject; 5 /* $_SESSION['user'] == 0 , don't work . 6 * == 1 , he is really user . 7 */ 8 private function __construct() 9 {10 if(! ( isset($_SESSION['user']) && $_SESSION['user& 阅读全文
posted @ 2011-08-07 15:42 All right 阅读(287) 评论(0) 推荐(0) 编辑