php - 意外的响应代码 503 (Android Studio)

标签 php android error-handling server android-volley

我有一个 android 应用程序,我已经在 php 中创建了 API,并且我已经在 hostinger.com 上上传了所有 API 我的应用程序在做什么,例如我必须登录到应用程序我的 android 代码是这样的:

String register_url="http://iot2k19.hostingerapp.com/do_login.php"; 

这是做什么的?它让我的应用程序使用 do_login.php 并且 do_login.php 存在于托管程序的文件管理器中。直到最后一天,一切都很好。现在我的应用程序无法连接到托管商,我已经联系了托管商支持中心,他们让我购买一个新域。

enter image description here

直到最后一天我都没有得到这个你的域没有指向我们的名称服务器。 现在我的 android studio logcat 说:

11-13 18:51:16.635 29958-30309/test.gul.newelectro1 E/Volley: [3245] BasicNetwork.performRequest: Unexpected response code 503 for http://iot2k19.hostingerapp.com/do_login.php

这一切都工作正常,我没有做任何改变所以是托管商的错误还是我做错了,因为托管商支持中心告诉我他们正面临一些关于免费子域的问题,他们正在努力解决这个问题。但已经过了一天,我得到了这个东西。 如果我们查看应用程序,它会说:

enter image description here

这些是我的 API(php 文件),我的应用无法访问这些文件: enter image description here

最佳答案

你的代码没问题,你得到的错误 503 是服务器告诉你服务当前不可用,Hostinger 免费服务器不时出现故障,持续时间不应超过一周所以请耐心等待它最终会回来,否则如果您需要它一直可用,您可以购买并支付域名。我刚刚尝试了您的链接,看起来不错

关于php - 意外的响应代码 503 (Android Studio),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58838977/

相关文章:

php - 将到期时间插入数据库并在另一页上倒计时

android - 在 Android Studio 4.0(Canary) 中找不到预览窗口的位置

php - Laravel 5.3 socialite 安装报错

php - 使用 php 脚本导入 Mysql xlsx 文件 大文件(以 MB 为单位)

android - 是否有任何单一字体支持所有 android 设备中的所有印度语言?

android - 将改造错误作为 gson 模型处理

flutter - 如何捕捉 "Unable to load asset: assets/images/sample_img_url.png"

r - 在R getGEO上捕获异常

php - 如何在CentOS 8下安装phpseclib?

android - 四方转二维码