本文整理汇总了PHP中r::isodatetime方法的典型用法代码示例。如果您正苦于以下问题:PHP r::isodatetime方法的具体用法?PHP r::isodatetime怎么用?PHP r::isodatetime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类r
的用法示例。
在下文中一共展示了r::isodatetime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fopen
$fd = fopen('.htaccess', 'w');
if ($fd === FALSE) {
@unlink('class/config.php');
header('HTTP/1.1 500 Internal Error');
exit;
}
fputs($fd, 'RewriteEngine on' . PHP_EOL . 'Options -Indexes +FollowSymlinks' . PHP_EOL);
fputs($fd, 'RewriteBase ' . ($dir === '' ? '/' : $dir) . PHP_EOL);
fputs($fd, 'RewriteRule ^(ajax.*) $1 [L,NC,QSA]' . PHP_EOL . 'RewriteRule ^(assets)/(.*) $1/$2 [L,NC]' . PHP_EOL . 'RewriteRule ^.*$ index.php [L,QSA]' . PHP_EOL);
fclose($fd);
/*
* Try opening the database and setting up the User table
*/
require 'rb.php';
try {
$now = r::isodatetime(time() - date('Z'));
# make sure the timestamp is in UTC (this should fix a weird problem with some XAMPP installations)
$vals['dbhost'] = $cvalue['dbhost'];
$vals['dbname'] = $cvalue['dbname'];
$vals['dbuser'] = $cvalue['dbuser'];
R::setup('mysql:host=' . $cvalue['dbhost'] . ';dbname=' . $cvalue['dbname'], $cvalue['dbuser'], $cvalue['dbpass']);
# mysql initialiser
R::freeze(FALSE);
R::nuke();
# clear everything.....
$user = R::dispense('user');
$user->email = $cvalue['email'];
$user->login = $cvalue['admin'];
$user->password = password_hash($cvalue['adminpw'], PASSWORD_DEFAULT);
$user->active = 1;
$user->confirm = 1;