方法output未定义!请检查是否控制器类(welcome)与数据模型...

#1 aithan

方法 output未定义!
请检查是否控制器类(welcome)与数据模型类重名?



  • \SpeedPHP\Core\spController.php on line 200
195.      {
196.          //print_r($GLOBALS['G_SP']);exit;
197.          if(in_array($name, $GLOBALS['G_SP']["auto_load_controller"])){
198.              return spClass($name)->__input($args);
199.          }elseif(!method_exists( $this, $name )){
200.              spError("方法 {$name}未定义!
请检查是否控制器类(".get_class($this).")与数据模型类重名?");

201.          }
202.      }
203.
204.      /**
205.       * 获取模板引擎实例  



这是什么原因


2012-10-23 09:21:31

#2 jake

原因是:请检查是否控制器类(welcome)与数据模型类重名?

2012-10-23 09:50:01

#3 aithan

可是我检查过了   控制器类(welcome)与数据模型类  没有重命名的情况

2012-10-23 09:52:31

#4 aithan

jake 发表于 2012-10-23 09:50
原因是:请检查是否控制器类(welcome)与数据模型类重名?
[table=98%]
[tr][td]可是我检查过了   控制器类(welcome)与数据模型类  没有重命名的情况[/td][/tr]
[/table]

2012-10-23 09:53:04

#5 aithan

public function index(){
                $this->albums = $this->getHotestAlbum();
                $ptx_staruser = spClass('staruser');
                $staruser_cachetime = $this->settings['optimizer_setting']['cache_time_star'];
                $this->starusers = $ptx_staruser->get_staruser_cache($staruser_cachetime);
                $ptx_goodshop = spClass('goodshop');
                $this->goodshops = $ptx_goodshop->get_goodshop_cache();
                //if($this->settings['ui_layout']['count_or_lastest']=='lastest'){
                        $this->shares = $this->getLastest20();
                //}else{
                        $this->count = $this->getPtxCount();
                //}
                $this->topics = $this->getLastestTopics();
                $this->hotusers = $this->getHotestUser();
                $this->today_stars = $this->getTodayStarUser();
                $this->prepareView();
                $this->output("welcome/index");
        }

2012-10-23 09:54:54

#6 jake

                 $this->prepareView();
                 $this->output("welcome/index");

在speedphp里面,显示是用display,不是output。请看入门教程。

2012-10-23 09:58:26

#7 aithan

jake 发表于 2012-10-23 09:58
$this->prepareView();
                 $this->output("welcome/index");
我用DISPLAY的情况下   模板里面嵌套的模板加载不上

2012-10-23 11:06:05

#8 jake

aithan 发表于 2012-10-23 11:06
我用DISPLAY的情况下   模板里面嵌套的模板加载不上
请看手册

2012-10-23 11:18:30