dpkajqd31574096 2017-05-05 16:18
浏览 51
已采纳

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条回答 默认 最新

  • duanchi6377 2017-05-05 16:22
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 使用Photon PUN2解决游戏得分同步的问题
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了