本文整理汇总了PHP中uri::create方法的典型用法代码示例。如果您正苦于以下问题:PHP uri::create方法的具体用法?PHP uri::create怎么用?PHP uri::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uri
的用法示例。
在下文中一共展示了uri::create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_send_reset_password_mail
/**
* Confirm reset password
*
* @access public
* @return Response
*/
public function action_send_reset_password_mail()
{
// Already logged in
Auth::check() and Response::redirect('member');
Util_security::check_method('POST');
Util_security::check_csrf();
$form = $this->form_resend_password();
$val = $form->validation();
if (!$val->run()) {
Session::set_flash('error', $val->show_errors());
$this->action_resend_password();
return;
}
$post = $val->validated();
$message = term('site.password') . 'のリセット方法をメールで送信しました。';
if (!($member_auth = Model_MemberAuth::get4email($post['email']))) {
Session::set_flash('message', $message);
Response::redirect(conf('login_uri.site'));
return;
}
$member = Model_Member::check_authority($member_auth->member_id);
$error_message = '';
$is_transaction_rollback = false;
try {
$maildata = array();
DB::start_transaction();
$token = Model_MemberPasswordPre::save_with_token($member_auth->member_id, $post['email']);
DB::commit_transaction();
$mail = new Site_Mail('memberResendPassword');
$mail->send($post['email'], array('to_name' => $member->name, 'register_url' => sprintf('%s?token=%s', uri::create('member/recover/reset_password'), $token)));
Session::set_flash('message', $message);
Response::redirect(conf('login_uri.site'));
} catch (EmailValidationFailedException $e) {
Util_Toolkit::log_error('send mail error: ' . __METHOD__ . ' validation error');
$error_message = 'メール送信エラー';
} catch (EmailSendingFailedException $e) {
Util_Toolkit::log_error('send mail error: ' . __METHOD__ . ' sending error');
$error_message = 'メール送信エラー';
} catch (\Database_Exception $e) {
$is_transaction_rollback = true;
$error_message = \Site_Controller::get_error_message($e, true);
} catch (FuelException $e) {
$is_transaction_rollback = true;
$error_message = $e->getMessage();
}
if ($error_message) {
if ($is_transaction_rollback && DB::in_transaction()) {
DB::rollback_transaction();
}
Session::set_flash('error', $error_message);
}
$this->action_resend_password();
}
示例2: array
<script type="text/javascript"src="<?php
echo uri::create('assets/js/admin/category.js');
?>
"></script>
<style>
input[type='text'],select {
width:170px;
position:relative;
top:3px;
}
</style>
<a href='javascript:void(0)' id="filter-trigger-js" class="moreinfo showHide"><i class="fa fa-folder-o fa-2x" title="filter"></i></a>
<span class="fancyLink"><?php
echo Html::anchor('admin/category/create', '<i class="fa fa-plus-square fa-2x" title="Add Category"></i> ', array('class' => 'moreinfo', 'title' => 'Add User'));
?>
</span>
<br />
<br />
<div id="filter-js" style="display:none" >
<table class="table">
<tr>
<td>
<div class="input email">
<?php
echo Form::label('Name', 'name');
?>
<?php
echo Form::input('name', '', array('class' => '', 'onkeyup' => 'filterCategory()'));
?>
示例3:
<script src="<?= uri::create('assets/js/jquery-1.11.1.min.js') ?>" type="text/javascript"></script>
<script type="text/javascript" src="<?= uri::create('assets/js/notifier/notifier.js') ?>"></script>
<?php echo View::forge('js/variables'); ?>
<?php */
?>
<!-- IMAGE CROPPER PLUGIN START -->
<link rel="stylesheet" href="<?php
echo uri::create('assets/css/cropper/cropper.css');
?>
">
<script type="text/javascript" src="<?php
echo uri::create('assets/js/cropper/cropper.js');
?>
"></script>
<script type="text/javascript" src="<?php
echo uri::create('assets/js/cropper/crop.js');
?>
"></script>
<div class="modal-header">
<h3>Crop Image</h3>
</div>
<div class="modal-body">
<div id="js-cover-loading-div" >
<input type="hidden" id="crop_upload_id" name="upload_id" value="<?php
echo $uploads->id;
?>
">
<img width="100%" id="image" src="<?php
echo Uri::create('upload/get_image/' . $uploads->name . '/' . $uploads->id);