php - Yii框架如何配置Restful?
阿神
阿神 2017-04-10 16:40:52
0
2
376

按照它的官网配置的教程:
http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html

  • 新建UserController

  • 配置config/web.php

还要再作其它操作吗?现在的情况是,所有的网站都404

配置了 rules 之后,全站报500。。。我也是醉了。

阿神
阿神

闭关修行中......

reply all(2)
黄舟

慢慢看文档,官方都是说明吧

Peter_Zhu

.htaccess配了吗?需要放在web目录下

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php [L]
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!