2016-11-06 63 views
1

設法讓登錄註冊應用程序與this toturial,但我不能和DOS無法從虛擬機或真正的服務器無論運行項目還嘗試這麼多的另一個toturials,但不能工作正確的路徑! 。所以我的問題是什麼是用於連接到服務器和數據庫定地址路徑正確的方法:什麼是與服務器和數據庫連接的登錄註冊

作爲該toturial這是我的登錄和註冊路徑:

註冊活動
private static final String URL_REGISTER = "http://memaraneha.ir/Erfan/android_login/register.php"; 

private static final String URL_LOGIN = "http://memaraneha.ir/Erfan/android_login/login.php"; 

在登錄活動,這是我的config.php信息(我確定這個用戶和數據庫在我的服務器存在):

$username = 「yashilgo_eri」; 

$password = 「erfan1373」; 

$host = 「memaraneha.ir」; 

$dbname = 「yashilgo_erfan」; 

這樣有什麼不好?

回答

0
$username = "yashilgo_eri"; 

$password = "erfan1373"; 

$host = "http://memaraneha.ir";//for server 

$dbname = "yashilgo_erfan"; 

// $host = "localhost"; //For localsystem default access 
// $username = "root"; 
// $password = ""; 
// $dbname = "yashilgo_erfan"; 

而且不同意這種類型的互聯網接入關鍵的還是這裏 它完全不安全

+0

不認爲爲$主機=「http://memaraneha.ir」;因爲我嘗試另一個例子,並且給我的錯誤類型主機 – erfan