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';
存在于众多的文件。
什么似乎是问题?我该如何解决它?预先感谢您