写了一个接口,使用路径为localhost/api/web/index.php?r=user/test
actiontest的代码就是echo '123';
根据网上的教程,配置了urlmanager,代码如下
'urlManager' => [
'enablePrettyUrl' => true, //美化url==ture
'enableStrictParsing' => false, //不启用严格解析
'showScriptName' => false, //隐藏index.php
'rules' => [
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
],
],
然后配置了nginx的rewrite
listen 80;
server_name localhost;
location / {
root D:/Github/Server/advanced;
index index.php index.html index.htm;
#开启rewirte
if (!-e $request_filename){
rewrite ^/(.*) /index.php?r=$1 last;
} 真心求解,
回复内容:
写了一个接口,使用路径为localhost/api/web/index.php?r=user/test
actiontest的代码就是echo '123';
根据网上的教程,配置了urlmanager,代码如下
PHP商城系统是国内领先商城系统,网店系统,购物系统,网上商城系统,B2C商城系统产品.同时也是一个商业的PHP开发框架。PHP 商城系统由内容、文章、会员、留言、订单、 财务、广告、短消息、数据库管理、营销推广、内置支付管理、商品配送管理、无限级分类、全站搜索等多个功能模块插件组成。在当今瞬机万变的市场环境中,快速高效的IT解决方案是您业务成功的关键。我们PHP商城系统能为您量身打造完全符合需求
'urlManager' => [
'enablePrettyUrl' => true, //美化url==ture
'enableStrictParsing' => false, //不启用严格解析
'showScriptName' => false, //隐藏index.php
'rules' => [
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
],
],
然后配置了nginx的rewrite
listen 80;
server_name localhost;
location / {
root D:/Github/Server/advanced;
index index.php index.html index.htm;
#开启rewirte
if (!-e $request_filename){
rewrite ^/(.*) /index.php?r=$1 last;
} 真心求解,









