浏览代码

Rättat url

Axel Nordh 3 年之前
父节点
当前提交
b7ef225d2a
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      Assets/Scripts/Database/DatabaseController.cs
  2. 1 1
      ServerFiles/Categories.php

+ 3 - 3
Assets/Scripts/Database/DatabaseController.cs

@@ -9,8 +9,8 @@ public class DatabaseController : MonoBehaviour
 {
 
     private string secretKey = "TheNarKampenSecretKey";
-    public string questionURL = "http://nordh.xyz:8088/narKampen/Questions.php?";
-    public string categoriesURL = "http://nordh.xyz:8088/narKampen/Categories.php";
+    public string questionURL = "http://nordh.xyz:8088/Questions.php?";
+    public string categoriesURL = "http://nordh.xyz:8088/Categories.php";
 
     public Text statusText;
 
@@ -27,7 +27,7 @@ public class DatabaseController : MonoBehaviour
 
         yield return request.SendWebRequest();
 
-        if (request.isDone)
+        if (request.result == UnityWebRequest.Result.Success)
         {
             Debug.Log(request.downloadHandler.text);
         }

+ 1 - 1
ServerFiles/Categories.php

@@ -19,7 +19,7 @@ try {
 }
 
 $sth = $dbh->query("SELECT * FROM Category");
-$sbh->setFetchMode(PDO::FETCH_ASSOC);
+$sth->setFetchMode(PDO::FETCH_ASSOC);
 
 $result = $sth->fetchAll();