本文整理汇总了PHP中Variable::ecrire方法的典型用法代码示例。如果您正苦于以下问题:PHP Variable::ecrire方法的具体用法?PHP Variable::ecrire怎么用?PHP Variable::ecrire使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Variable
的用法示例。
在下文中一共展示了Variable::ecrire方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_config
function update_config()
{
foreach ($_REQUEST as $var => $value) {
if (!preg_match('/^' . Parseur::PREFIXE . '/', $var)) {
continue;
}
Variable::ecrire($var, $value);
}
// Bug 1.4.3.1
if (class_exists('CacheBase')) {
CacheBase::getCache()->reset_cache();
}
}
示例2: modifier
/**
* Modifier une langue existante
*
*/
public function modifier($id, $description, $code, $url, $defaut)
{
$lang = new Lang();
if ($lang->charger_id($id)) {
$lang->description = trim($description);
$lang->code = strtolower(trim($code));
$lang->defaut = $defaut;
if ($this->get_un_domaine_par_langue() == 1) {
$lang->url = rtrim($url, "/");
// Compatibilité ascendante: urlsite contient l'url du site par defaut.
if ($defaut) {
Variable::ecrire('urlsite', $lang->url);
}
}
$lang->maj();
ActionsModules::instance()->appel_module("modlangue", $lang);
}
}
示例3: Administrateur
$admin = new Administrateur();
$admin->charger_id(1);
$admin->identifiant = $_POST['utilisateur'];
$admin->motdepasse = $_POST['motdepasse1'];
$admin->profil = 1;
$admin->crypter();
$admin->maj();
Variable::ecrire("emailcontact", $_POST['emailcontact']);
Variable::ecrire("emailfrom", $_POST['emailcontact']);
Variable::ecrire("emailscommande", $_POST['emailcontact']);
Variable::ecrire("nomsite", $_POST['nomsite']);
Variable::ecrire("urlsite", $_POST['urlsite']);
$lang = new Lang();
$query_cnx = "update {$lang->table} set url=\"" . rtrim($_POST['urlsite'], "/") . "\" where id=1";
$resul_cnx = $lang->query($query_cnx);
Variable::ecrire("rsspass", genpass(40));
}
$_SESSION['etape'] = 5;
include_once __DIR__ . "/entete.php";
$parser = xml_parser_create('UTF-8');
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
$xml = file_get_contents('http://thelia.net/spip.php?page=xml_modules_promus&var_mode=calcul');
$values = array();
$index = array();
xml_parse_into_struct($parser, $xml, $values);
$listeModules = false;
$infosModule = false;
$listeModulesPromus = array();
foreach ($values as $key => $node) {
if ($node['tag'] == 'modules' && $node['type'] == 'open' && $node['level'] == 1) {
示例4: cleanup_cache
public static function cleanup_cache($cache_dir, $force = 0)
{
// Doit-on purger le cache ?
$last_check = intval(Variable::lire(Parseur::PREFIXE . '_cache_check_time'));
$check_period = intval(3600 * Variable::lire(Parseur::PREFIXE . '_cache_check_period'));
if ($force == 0 && time() - $last_check < $check_period) {
return;
}
Variable::ecrire(Parseur::PREFIXE . '_cache_check_time', time());
$cache_file_lifetime = 3600 * Variable::lire(Parseur::PREFIXE . '_cache_file_lifetime');
if ($dh = @opendir($cache_dir)) {
while ($file = readdir($dh)) {
if (strstr($file, '.cache') !== false) {
$path = $cache_dir . $file;
$filemtime = @filemtime($path);
if (!$filemtime || time() - $filemtime >= $cache_file_lifetime) {
@unlink($path);
}
}
}
@closedir($dh);
}
}