本文整理匯總了PHP中route::has方法的典型用法代碼示例。如果您正苦於以下問題:PHP route::has方法的具體用法?PHP route::has怎麽用?PHP route::has使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類route
的用法示例。
在下文中一共展示了route::has方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
echo $sessid;
?>
</li>
<li>
<!-- We safely hashed a password for storage -->
<strong>Password Hash:</strong> <?php
echo $pwd;
?>
</li>
</ul>
<?php
// Detect $_GET variables
if (route::has('do_bcrypt')) {
// Skips password hashing (by default) for demo purposes of showing route::has() feature
echo '<h3><a href="./ext">Don\'t hash password?</a> Skipping hashing will load this page faster!</h3>';
} elseif (!route::has('do_bcrypt')) {
// Performs a secure password hash using the io::helper('security')->hash() method
echo '<h3><a href="./ext?do_bcrypt=true">Hash Password?</a> Will take a moment longer to load...</h3>';
}
/*
* Notice how the $key => $variables transferred over into the view. The variables
* from demo.php are not available, we only access what was passed to the view
* via the array containing the $key => $value pairs. Another look at the code:
*/
/*
* View loaded from application/models/demo.php
*
$page = io::view('welcome', array(
'name' => $first.' '.$last,
'bday' => $dob,
'bday_ago' => $birthday,