Slimframework + AngularJS路线

Well, I'm trying to create a web application with Angular 1.6 and SlimFramework 3.3

The problem is when i try to use the slim framework routes.

I've put all the slim functions inside de "/api" folder. It works when I try ex: "localhost/api/" but if i try "localhost/api/user" it says "Object not found"

// API group
$app->group('/', function () {
// User
  $this->get('/user', 'App\Action\painel\HomeAction:index');
});

https://gist.github.com/miorac/28ab8daf84d0c7cedc3101806642c2c6

1个回答



问题解决了:
我需要将.htaccess重写为该子路由。 我做的是将我的主htaccess复制到/ api文件夹</ p>
</ div>

展开原文

原文

Problem solved: I need to rewrite my .htaccess to that sub-routes. What i did is copy my main htaccess into the /api folder

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐