<?php // if this wasnt defined, then automaticly run the script asuming this is standalone if (!defined('CHERYL_CONTROL')) { $cheryl = new Cheryl(); $cheryl->go(); }
<?php /** * Basic Cheryl example of using a separate index script * * uses static cheryl methods * */ // if CHERYL_CONFIG is defined, the script will not automatilcy run define('CHERYL_CONTROL', true); // if you want better password hashing, put something here define('CHERYL_SALT', 'SOMETHING/NOT/COOL/AND/RANDOM'); // include the Cheryl libraries require_once '../../build/Cheryl.php'; // give Cheryl our config. this will merge with the default config Cheryl::init(array('root' => '../files', 'users' => array(array('username' => 'admin', 'password' => Cheryl::password('password'), 'permissions' => 'all')))); // manualy run the script since were using a custom config Cheryl::go();