【问题标题】:Getting an "Internal System Error" on PHP pages在 PHP 页面上出现“内部系统错误”
【发布时间】:2016-05-23 00:11:41
【问题描述】:

我正在建立一个简单登录的网站。我将它主要设置在远程服务器上,然后决定设置一个测试服务器。它运行良好,因此我将文件上传到远程服务器。现在我在所有 PHP 页面上都收到“内部系统错误”。我是 PHP 新手并使用 Dreamweaver。我在这里没有找到我的特殊情况。 DW 中的错误指向下面的文件(特别是第 9 行)。我不知道如何解决它。有人可以帮忙吗?

    <?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); 
    ?

【问题讨论】:

标签: php forms server localhost dreamweaver


【解决方案1】:

通常当使用 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); 

另外,脚本末尾没有结束“>”字符,但我认为这是一个复制粘贴问题。

【讨论】:

  • 谢谢你们俩。我会检查这些事情。我可能必须回来,但希望不会。哈。
  • 再次感谢你们解决了我的问题...现在继续下一个问题。猜猜这很快就会成为另一个问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-23
  • 1970-01-01
  • 2012-04-23
  • 2015-05-02
  • 2012-07-08
相关资源
最近更新 更多