2016-02-12 42 views
1

我使用簡單的登錄設置網站。我主要是在遠程服務器上設置它,然後決定設置一個測試服務器。它運行良好,然後我將文件上傳到遠程服務器。現在我在所有的PHP頁面上都出現「內部系統錯誤」。我是PHP新手,使用Dreamweaver。我沒有在這裏找到我的特殊情況。 DW中的錯誤指向下面的文件(特別是第9行)。我不知道如何解決它。誰能幫忙?在PHP頁面上獲取「內部系統錯誤」

<?php 
    # FileName="Connection_php_mysql.htm" 
    # Type="MYSQL" 
    # HTTP="true" 
    $hostname_thelivingoracles = "localhost"; 
    $database_thelivingoracles = "thelivingoracles"; 
    $username_thelivingoracles = "username"; 
    $password_thelivingoracles = "password"; 
    $thelivingoracles = mysqli_connect($hostname_thelivingoracles, 
    $username_thelivingoracles, $password_thelivingoracles) or 
    trigger_error(mysql_error(),E_USER_ERROR); 
    ? 
+0

您只將3個參數傳遞到第9行的mysqli_connect而不是4.您缺少數據庫參數。 http://php.net/manual/en/function.mysqli-connect.php – Matt

回答

3

通常連接到特定數據庫mysqli_connect時()語法是:

$link = mysqli_connect("127.0.0.1", "my_user", "my_password", "my_db"); 

看起來你已經離開了你的數據庫的名字嗎?

$thelivingoracles = mysqli_connect($hostname_thelivingoracles, 
$username_thelivingoracles, $password_thelivingoracles, $database_thelivingoracles) or 
trigger_error(mysql_error(),E_USER_ERROR); 

此外,腳本末尾沒有關閉'>'字符,我認爲這是一個複製粘貼問題。

+1

謝謝你們倆。我會檢查這些東西。我可能不得不回來,但希望不會。哈。 – Newsong80

+0

再次感謝你們解決了我的問題......現在解決下一個問題。猜猜這將是另一個問題。 – Newsong80