當前位置: 首頁>>代碼示例>>PHP>>正文


PHP route::has方法代碼示例

本文整理匯總了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,
開發者ID:olscore,項目名稱:ornithopter.io,代碼行數:31,代碼來源:example.php


注:本文中的route::has方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。