|
本帖最后由 zbbok 于 2017-8-25 10:32 编辑
在 controllers/ 目录下有一个文件 Wx.php ,内容如下:
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- /**
- * @brief 微信公众平台控制器
- */
- define('TOKEN','xxx');
- class Wx extends WX_Controller
- {
- public function __construct()
- {
- parent::__construct();
- }
-
- public function index()
- {
- if(!isset($_GET['echostr'])){
- $this->responseMsg();
- }else{
- $this->valid();
- }
- }
- }
复制代码
WX_Controller.php 放在 core 目录下,内容如下:
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- /**
- * @brief
- *
- * @author
- */
- class WX_Controller extends CI_Controller
- {
- public function __construct()
- {
- // parent::__construct();
- }
-
- }
复制代码
报错: Fatal error: Class 'WX_Controller' not found in E:\PHPStudy\WWW\xxx.net\application\controllers\Wx.php on line 9
|
|