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


PHP Website::setPasswordsEncryption方法代碼示例

本文整理匯總了PHP中Website::setPasswordsEncryption方法的典型用法代碼示例。如果您正苦於以下問題:PHP Website::setPasswordsEncryption方法的具體用法?PHP Website::setPasswordsEncryption怎麽用?PHP Website::setPasswordsEncryption使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Website的用法示例。


在下文中一共展示了Website::setPasswordsEncryption方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Error_Critic

             new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
         }
         if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER)) {
             Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
         } else {
             new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
         }
         if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS)) {
             Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
         } else {
             new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
         }
     } else {
         new Error_Critic('#E-6', 'Database error. Unknown database type in <b>server config</b> . Must be equal to: "<b>mysql</b>", "<b>sqlite</b>" or "<b>pgsql</b>" . Now is: "<b>' . Website::getServerConfig()->getValue(SERVERCONFIG_SQL_TYPE) . '</b>"');
     }
     Website::setPasswordsEncryption(Website::getServerConfig()->getValue('passwordtype'));
     $SQL = Website::getDBHandle();
 }
 if ($step == 'start') {
     echo '<h1>STEP ' . $step . '</h1>Informations<br>';
     echo 'Welcome to Gesior Account Maker installer. <b>After 5 simple steps account maker will be ready to use!</b><br />';
     // check access to write files
     $writeable = array('config/config.php', 'cache', 'cache/flags', 'cache/DONT_EDIT_usercounter.txt', 'cache/DONT_EDIT_serverstatus.txt', 'custom_scripts', 'install.txt');
     foreach ($writeable as $fileToWrite) {
         if (is_writable($fileToWrite)) {
             echo '<span style="color:green">CAN WRITE TO FILE: <b>' . $fileToWrite . '</b></span><br />';
         } else {
             echo '<span style="color:red">CANNOT WRITE TO FILE: <b>' . $fileToWrite . '</b> - edit file access for PHP [on linux: chmod]</span><br />';
         }
     }
 } elseif ($step == 1) {
開發者ID:Pietia10,項目名稱:Gesior-for-OTServ,代碼行數:31,代碼來源:install.php

示例2: Error_Critic

} else {
    new Error_Critic('#E-3', 'There is no key <b>mysqlHost</b> in server config', array(new Error('INFO', 'use server config cache: <b>' . (Website::getWebsiteConfig()->getValue('useServerConfigCache') ? 'true' : 'false') . '</b>')));
}
Website::setDatabaseDriver(Database::DB_MYSQL);
if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST)) {
    Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
} else {
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
}
if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PORT)) {
    Website::getDBHandle()->setDatabasePort(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PORT));
} else {
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PORT . '</b> in server config file.');
}
if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE)) {
    Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
} else {
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
}
if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER)) {
    Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
} else {
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
}
if (Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS)) {
    Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
} else {
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');
}
Website::setPasswordsEncryption("sha1");
$SQL = Website::getDBHandle();
開發者ID:totolol123,項目名稱:TFS-Flash,代碼行數:31,代碼來源:load.database.php


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