예제 #1
0
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,