亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Joomla下利用configuration.php存儲簡單數(shù)據(jù)

 更新時間:2010年05月19日 23:45:34   作者:  
Joomla下利用configuration.php存儲簡單數(shù)據(jù)的代碼,需要的朋友可以參考下。
寫入過程
復制代碼 代碼如下:

// Get the path of the configuration file
$fname = JPATH_CONFIGURATION.DS.'configuration.php';
// clear cache
$cache = JFactory::getCache();
$cache->clean();
// Update the credentials with the new settings
$config =& JFactory::getConfig();
$config->setValue('config.custom_var', 'xxx');
// Get the config registry in PHP class format and write it to configuation.php
jimport('joomla.filesystem.file');
if (!JFile::write($fname, $config->toString('PHP', 'config', array('class' => 'JConfig')))) {
die(JText::_('ERRORCONFIGFILE'));
}

提取過程
復制代碼 代碼如下:

global $mainframe;
$mainframe->getCfg('custom_var');

相關文章

最新評論