为什么控制器会运行两次?

浏览:483 发布日期:2016/09/17 分类:求助交流
我用的是3.2.3版本,编写控制器如下:<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $this->success('success');
    }
    public function test(){
        logger('test');
    }
    }
}
运行结果发现日志文件记录了两次,如下:
执行时间:2016-09-17 10:11:00
test
执行时间:2016-09-17 10:11:00
test
最佳答案
评论( 相关
后面还有条评论,点击查看>>