本文整理汇总了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());
}