<?php require substr(dirname(__FILE__), 0, -6) . '/init.inc.php'; Validate::checkSession(); global $_tpl; $_comment = new CommentAction($_tpl); $_comment->_action(); $_tpl->display('comment.tpl');
<?php require '../init.inc.php'; Validate::Check_Login(); global $templates; $comment = new CommentAction('comment.tpl'); $comment->Action(); //开始执行action方法 $templates->display('comment.tpl'); //载入解析后的模板文件,生成页面