怎么感覺$template = $twig->loadTemplate('index.html');有問題,應(yīng)該把index.html更換為$file; 為什么老是的可以正常的變換加載?我改成$file才可以
2016-10-29
display 那個(gè)方法應(yīng)該是$template = $twig->loadTemplate ( $filename ); 虎頭老師寫錯(cuò)了哦
2016-10-28
public static function load(){
set_include_path(get_include_path().PATH_SEPARATOR);
spl_autoload_register();
}
然后直接 \core\imooc::load()不就自動(dòng)加載
set_include_path(get_include_path().PATH_SEPARATOR);
spl_autoload_register();
}
然后直接 \core\imooc::load()不就自動(dòng)加載
2016-10-27
$route = new \core\route(); //如果是這行報(bào)錯(cuò)的話,可以加上require_once CORE.'/route.php'調(diào)試一下,我的錯(cuò)誤是把spl_autoload_register()放在了require_once CORE.'/main.php';之前,希望對(duì)你有所幫助。
2016-10-23