本文整理汇总了PHP中Crypt::en方法的典型用法代码示例。如果您正苦于以下问题:PHP Crypt::en方法的具体用法?PHP Crypt::en怎么用?PHP Crypt::en使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crypt
的用法示例。
在下文中一共展示了Crypt::en方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encrypt
function encrypt($id, $prefix = "JHC", $clear = false)
{
$crypt = new \Crypt();
$x = $prefix . $crypt->en(intval($id));
if (!$clear) {
return $x;
}
if (strpos($x, '=') !== false || strpos($x, '-') !== false) {
// PLog::write("Not a problem: Try again for no '= or -' in encrypt string", "INFO");
return encrypt_id($id, $prefix, $clear);
} else {
return $x;
}
}
示例2: encrypt_id
static function encrypt_id($id, $prefix = "CYD")
{
return $prefix . Crypt::en(intval($id));
}
示例3: encrypt_id
function encrypt_id($id, $prefix = "XSZZ")
{
return $prefix . Crypt::en($id);
}
示例4: foreach
?>
<?php
if (count($archives) > 1) {
?>
<div>
<i class="icon-briefcase"></i>申请表提交记录存档
<?php
if (is_array($archives)) {
foreach ($archives as $key => $one) {
echo ++$idx;
?>
. <a href="<?php
echo D('Options')->getOption('webroot_apply');
?>
/userinfo/preview?token=<?php
echo Crypt::en($user['userinfo']['id']);
?>
&archive_id=<?php
echo $key;
?>
" target="_blank"><?php
echo substr($one, 0, 16);
?>
</a> <?php
}
}
?>
</div><?php
}
?>
示例5: submit_forget_password
public function submit_forget_password()
{
$email = $this->_param("email");
if (!Utility::CaptchaCheck($this->_post('verifycode'))) {
Session::Set("error", "验证码有误,请重新输入");
redirect("/register/forget_password");
}
if ($email) {
$user = D("CmsUsers")->where(array("email" => $email))->find();
if ($user) {
$subject = D("Options")->getOption("verify_email_subject");
$repasscode = md5(generate_password());
D("CmsUsers")->where(array('id' => $user['id']))->setField("repasscode", $repasscode);
$link = D("Options")->getOption("webroot_apply") . "/register/verify_repass?id=" . Crypt::en($user['id']) . "&repasscode={$repasscode}";
$link = "<a href='{$link}'>" . $link . "</a>";
$subject = D("Options")->getOption("repass_email_subject");
$content = D("Options")->getOption("repass_email_content");
$content = str_replace("[#link#]", $link, $content);
Mailer::SmtpMail(null, $email, $subject, $content);
redirect("/register/submit_forget_password_result?token=" . Crypt::en($email));
} else {
Session::Set("error", "无此邮箱");
redirect("/register/forget_password");
}
} else {
Session::Set("error", "无此邮箱");
redirect("/register/forget_password");
}
}
示例6: encrypt_id
function encrypt_id($id)
{
return 'JXD' . Crypt::en(intval($id));
}