本文整理匯總了PHP中route::action方法的典型用法代碼示例。如果您正苦於以下問題:PHP route::action方法的具體用法?PHP route::action怎麽用?PHP route::action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類route
的用法示例。
在下文中一共展示了route::action方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check_register
/**
* 郵箱驗證
* @param int $user_id
* @param string $email
* @param string $token 找回密碼加密串
*/
public static function check_register($uid, $email, $lastname, $key)
{
$mail_type = 'register_mail_active';
$to_email = $email;
$from_email = '';
$expire = date('Y-m-d H:i', time() + Kohana::config('password.time'));
$check_url = route::action('check_register') . "user/reg_success/?key=" . $key . "&id=" . $uid . "&u=" . $lastname . "&e=" . $email;
$check_link = '<a href="' . $check_url . '" target="_blank">' . $check_url . '</a>';
$title_param = array();
$content_param = array('{username}' => $lastname, '{email}' => $email, '{expire}' => $expire, '{url}' => $check_url, '{url_link}' => $check_link);
self::send_mail(1, $mail_type, $to_email, $from_email, $title_param, $content_param);
}