本文整理匯總了PHP中History::action方法的典型用法代碼示例。如果您正苦於以下問題:PHP History::action方法的具體用法?PHP History::action怎麽用?PHP History::action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類History
的用法示例。
在下文中一共展示了History::action方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: update
public function update(History $history)
{
$query = $this->_db->prepare(' UPDATE t_history SET
action=:action, target=:target, description=:description, updated=:updated, updatedBy=:updatedBy
WHERE id=:id') or die(print_r($this->_db->errorInfo()));
$query->bindValue(':id', $history->id());
$query->bindValue(':action', $history->action());
$query->bindValue(':target', $history->target());
$query->bindValue(':description', $history->description());
$query->bindValue(':updated', $history->updated());
$query->bindValue(':updatedBy', $history->updatedBy());
$query->execute();
$query->closeCursor();
}
示例2: forward
public static function forward()
{
if (self::is_forward()) {
$_SESSION['client']['__history_id__']++;
}
self::$action = true;
$data = DB::GetOne('SELECT data FROM history WHERE session_name=%s AND page_id=%d AND client_id=%d', array(self::session_id(), $_SESSION['client']['__history_id__'] - 1, CID));
// $data = DB::BlobDecode($data);
if (GZIP_HISTORY && function_exists('gzuncompress')) {
$data = gzuncompress($data);
}
$_SESSION['client']['__module_vars__'] = unserialize($data);
location(array());
}