หน้า 1 จากทั้งหมด 1

R- ต้องการให้แสดงข้อมูลในส่วนของ event (html) แต่ error แบบนี้

โพสต์แล้ว: 13/10/2015 5:38 pm
โดย M030
ต้องการให้แสดงข้อมูลในส่วนของ event (html) แต่ error แบบนี้
Class ***\m_thaipost\controller\thaipost_control does not exist

controller --> m_thaipost.php

โค้ด: เลือกทั้งหมด

namespace ***\m_thaipost\controller;

class thaipost_control {

    public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, $root_path, $php_ext) {
        //ใส่argument
        $this->config = $config;
        $this->template = $template;
        $this->user = $user;
        $this->helper = $helper;
        $this->root_path = $root_path;
        $this->php_ext = $php_ext;
    }

    public function base($page = 1) {
           $mind = 'Welcome to ...';
        $this->template->assign_var('MIND', $mind);
        return $this->helper->render('m_thaipost.html');
    }

}

Re: R- ต้องการให้แสดงข้อมูลในส่วนของ event (html) แต่ error แบบนี้

โพสต์แล้ว: 13/10/2015 5:44 pm
โดย M030
M030 เขียน:ต้องการให้แสดงข้อมูลในส่วนของ event (html) แต่ error แบบนี้
Class ***\m_thaipost\controller\thaipost_control does not exist

controller --> m_thaipost.php

โค้ด: เลือกทั้งหมด

namespace ***\m_thaipost\controller;

class thaipost_control {

    public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, $root_path, $php_ext) {
        //ใส่argument
        $this->config = $config;
        $this->template = $template;
        $this->user = $user;
        $this->helper = $helper;
        $this->root_path = $root_path;
        $this->php_ext = $php_ext;
    }

    public function base($page = 1) {
           $mind = 'Welcome to ...';
        $this->template->assign_var('MIND', $mind);
        return $this->helper->render('m_thaipost.html');
    }

}
 
ได้แล้วค่ะ ใส่ชื่อ clas ใน controller ผิด