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


PHP r::isodatetime方法代碼示例

本文整理匯總了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;
開發者ID:Milwyr,項目名稱:University-Publication-Website,代碼行數:31,代碼來源:install.php


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