$time=date('YmdHis', time()).$this->get_millisecond(); function get_millisecond(){ list($usec, $sec) = explode(" ", microtime()); $msec=round($usec*1000); return $msec; }