访问: /shop/product 内容始终是之前输出的 已经重启了start.php
访问: /shop/product/fe 为啥是404
BaseController.php内容为
<?php namespace app; use app\service\Test; use support\Request; use support\Response; class BaseController { protected $request; public function __construct(Test $test) { $this->request = $test; } /** * 返回JSON数据 * @param array $data * @return \support\Response */ public function json(array $data = []) :Response { return json($data); } /** * 响应 string * @param string $string * @return Response */ public function content(string $string = '') :Response { return response($string); } /** * @param $template * @param array $data * @param null $app * @return Response */ public function view(string $template, array $data = [], $app = null):Response { return view($template, $data, $app); } }
重启服务器才能生效
BaseController.php内容为
重启服务器才能生效