账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    域名怎么写才能访问api接口
    27
    0

    我的项目名称是admin-api,我的域名没有指向public文件夹,指向的是项目文件夹的上级文件夹,我访问

    http://pachong.test/admin-api/public

    这个域名可以访问到laravel的默认首页。

    我添加了一个product-temp的api接口,我访问这个域名:

    http://pachong.test/admin-api/public/api/product-temp

    提示我:
    No input file specified.

    我的地址写错了么?怎么访问我的接口?

    我拿get路由试还是不行:

    Route::get('/hello', function (){
        return response()->json(['hello'=>'world']);
    });

    访问

    http://pachong.test/admin-api/public/api/hello

    还是没反应

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 夜语成章 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部