yii 配置问题 [ 新手入门 ]
大家好 ,我在项目中配置了 d对应的url 路由
'urlManager' => [
'class' => 'yii\web\UrlManager',
'showScriptName'=>FALSE,
'enablePrettyUrl' => true,
// 一般路由配置
'rules'=>array(
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
)
],
然后我 写了个函数 postController 中写了个函数 public function actionApiresult() {}
但是 nginx的 配置也加了 ,但是问题是 访问结果是404
Not Found (#404)
Unable to resolve the request: post/apiresult
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
不知道我哪配置错了 ,请大家帮忙解答谢谢。
共 2 条回复
brighten
注册时间:2014-12-19
最后登录:2019-07-31
在线时长:11小时15分
最后登录:2019-07-31
在线时长:11小时15分
- 粉丝4
- 金钱635
- 威望0
- 积分745