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

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

  • 新建UserController

  • 配置config/web.php

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

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

阿神
阿神

闭关修行中......

全部回覆(2)
黄舟

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

Peter_Zhu

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

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php [L]
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!