cache('change'.$phone,$code,180,'Ccode');//$phone為用戶手機號,$code為驗證碼
驗證
if(input('code')==cache('change'.$phone)){
//do somthing
}