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


PHP settings::set方法代碼示例

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


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

示例1: save

 function save()
 {
     settings::set('feedback', 'feedback_email', params::get('feedback_email'));
     settings::set('feedback', 'feedback_subject', params::get('feedback_subject'));
     settings::save('feedback');
     headers::self();
 }
開發者ID:rigidus,項目名稱:ea,代碼行數:7,代碼來源:main.module.php

示例2: genToken

 public static function genToken()
 {
     try {
         $code = str_random(30);
         settings::set("securityToken", $code);
     } catch (ParseException $e) {
         printf("Can´t generate a new Token: %s", $e->getMessage());
     }
 }
開發者ID:G4brym,項目名稱:ServerList.pt,代碼行數:9,代碼來源:settings.php

示例3: save

 function save()
 {
     settings::set('pages', 'global_page_keywords', params::get('global_page_keywords'));
     settings::set('pages', 'global_page_description', params::get('global_page_description'));
     settings::set('pages', 'global_page_keywords_check', params::isCheck('global_page_keywords_check'));
     settings::set('pages', 'global_page_description_check', params::isCheck('global_page_description_check'));
     settings::set('pages', 'redactor', params::isCheck('redactor'));
     settings::set('pages', 'jip', params::isCheck('jip'));
     settings::set('pages', 'global_page_title', params::get('global_page_title'));
     settings::save('pages');
     headers::self();
 }
開發者ID:rigidus,項目名稱:ea,代碼行數:12,代碼來源:settings.module.php

示例4: define

    define('DBCONNECTION', true);
    if (UTF8MODE) {
        db_execquery('SET NAMES utf8 COLLATE utf8_unicode_ci');
    }
    $setctl->load();
    if ($resetconfiguration) {
        $setctl->defaults();
        echo 'Configuration has been reset. Set $resetconfiguration = false; and reload.';
        die;
    }
    if (!$setctl->get('bundleconfigured')) {
        if (isset($bundleconfig) && is_array($bundleconfig)) {
            foreach ($bundleconfig as $name => $val) {
                $tval = $setctl->get($name);
                if (strlen($tval) == 0 || $tval == false || $tval == 0) {
                    $setctl->set($name, $val);
                }
            }
            $setctl->set('bundleconfigured', 1);
        }
    }
} else {
    define('DBCONNECTION', false);
    if (!$cfg['installerenabled']) {
        echo 'Can\'t connect to the database and the installer is disabled. (If you need to re-install switch $cfg[\'installerenabled\'] to true.)';
        die;
    }
    $setctl->setdbperform(false);
    $setctl->defaults();
}
class basedir
開發者ID:skaligotla,項目名稱:kplaylist,代碼行數:31,代碼來源:index.php

示例5: elseif

<?php

$code = "q2nQNl8k4xlfPEa8kEBCqIixrnxn8jJwgY6cgzYA6AixW3nX7kdVbBNbuNpO";
if (!isset($_GET['a'])) {
    die;
} elseif ($_GET['a'] != $code) {
    die;
}
$day = date("j");
$month = date("n");
$year = date("Y");
$servers = DB::table('mcservers')->get();
foreach ($servers as $server) {
    if ($server->mcs_qport == null) {
        mcservers::checkNoQuery($server->mcs_id, $server->mcs_ip, $server->mcs_port, $day, $month, $year);
    } else {
        mcservers::checkQuery($server->mcs_id, $server->mcs_ip, $server->mcs_qport, $day, $month, $year);
    }
}
settings::set('lastCheck', time());
banners::generateMC();
開發者ID:G4brym,項目名稱:ServerList.pt,代碼行數:21,代碼來源:checkCron.blade.php

示例6: disable

/**
 * Sets a setting to false
 *
 * @param string $setting	Name of setting
 */
function disable($setting)
{
    settings::set($setting, false);
}
開發者ID:preciousgeorge,項目名稱:Frank.php,代碼行數:9,代碼來源:library.php


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