2
我爲故障排除有人和網站的錯誤之一是這樣的:恆變量已經定義XAMPP錯誤
Constant serverusername already defined in C:\xampp\htdocs\employee\inc\db.php on line 5
db.php中的內容如下:
<?php
//Database Connection Settings
define ('hostnameorservername','localhost'); //Your server name or hostname goes in here
define ('serverusername','root'); //Your database username goes in here
define ('serverpassword',''); //Your database password goes in here
define ('databasenamed','asset'); //Your database name goes in here
global $connection;
$connection = @mysql_connect(hostnameorservername,serverusername,serverpassword) or die('Connection could not be made to the SQL Server. Please report this system error at <font color="blue">[email protected]</font>');
@mysql_select_db(databasenamed,$connection) or die('Connection could not be made to the database. Please report this system error at <font color="blue">[email protected]</font>');
?>
當我在整個目錄中搜索「serverusername」,在其他任何地方我都找不到
:\xampp\htdocs\employee\inc\db.php on line 5
H無論如何行:
include 'inc/db.php';
存在於衆多的文件。
什麼似乎是問題?我該如何解決它?預先感謝您