我在 localhost xammp 上安装了一个 travian 脚本,但出现了很多错误。
其中四个是应该保存mysql信息的通知。“使用未定义的常量 SQL_USE”
这四个错误是因为全局寄存器关闭而发生的吗?还是与此无关?
好的,所以在 GameEngine 里面有一个 config.php 文件。这个文件,当前正在执行的文件,对 config.php 和 config.php 的调用包含以下内容。
// ***** Database Username
define("SQL_USER", "root");
// ***** Database Password
define("SQL_PASS", "sergfree");
// ***** Database Name
define("SQL_DB", "trav");
// ***** Database - Table Prefix
define("TB_PREFIX", "s1_");
这是包含
include ("../../GameEngine/config.php");
这是当前文件位置 C:\xampp\htdocs\install\include\multihunter.php 那么为什么这不起作用?
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
Notice: Use of undefined constant DB_TYPE - assumed 'DB_TYPE' in C:\xampp\htdocs\GameEngine\Database.php on line 13
Notice: Use of undefined constant SQL_SERVER - assumed 'SQL_SERVER' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Notice: Use of undefined constant SQL_USER - assumed 'SQL_USER' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Notice: Use of undefined constant SQL_PASS - assumed 'SQL_PASS' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (trying to connect via tcp://SQL_SERVER:3306) in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
php_network_getaddresses: getaddrinfo failed: No such host is known.