Home  >  Article  >  Backend Development  >  这个步骤的功能是啥

这个步骤的功能是啥

WBOY
WBOYOriginal
2016-06-13 12:20:33987browse

这个方法的功能是啥

public static function init() {<br />	    // config info<br />	    global $setting_config;<br />	    self::parse_conf($setting_config);<br />	    define('MD5_KEY',md5($setting_config['md5_key']));<br /><br />	    if(function_exists('date_default_timezone_set')){<br />	        if (is_numeric($setting_config['time_zone'])){<br />	            @date_default_timezone_set('Asia/Shanghai');<br />	        }else{<br />	            @date_default_timezone_set($setting_config['time_zone']);<br />	        }<br />	    }<br /><br />	    //session start<br />	    self::start_session();<br />	    <br />	    //output to the template<br />	    Tpl::output('setting_config',$setting_config);<br />	    <br />	    //read language<br />	    Language::read('core_lang_index');<br />	}

------解决思路----------------------
init 中文释义:初始化
顾名思义,它是用来完成项目默认参数设置的


------解决思路----------------------
初始化框架设置。
执行了几步设置
1.定义MD5_KEY的值
2.设置default timezone
3.开启session
4.把setting_config的值加入到output可使用
5.加载core_lang_index

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn