|
楼主 |
发表于 2011-7-12 16:24:48
|
显示全部楼层
function update_plugin_cache()
{
$model_plugins = $result_plugins = array();
$plugins = $this->db->select('name,access')->where('active','1')->get('dili_plugins')->result_array();
foreach($plugins as $key => $plugin)
{
if(file_exists(FCPATH.'plugins/'.$plugin['name'].'/'.'plugin_'.$plugin['name'].EXT))
{
$result_plugins[$plugin['name']] = $plugin;
}
if(file_exists(FCPATH.'plugins/'.$plugin['name'].'/'.'plugin_model_'.$plugin['name'].EXT))
{
$model_plugins[$plugin['name']] = $plugin;
}
}
$result_plugins['plugins'] = $result_plugins;
改成这样.?
$result_plugins['plugins'] = $plugins ;
$result_plugins['model_plugins'] = $model_plugins;
file_put_contents(FCPATH.'settings/plugins'.EXT, $this->_arrayeval("setting['active_plugins']",$result_plugins));
}
乱改的,不知道对不对,来个人讨论讨论.! - -.
|
|