Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql数据库连接详细信息在包含的fle中永远不起作用_Mysql_Connection String - Fatal编程技术网

Mysql数据库连接详细信息在包含的fle中永远不起作用

Mysql数据库连接详细信息在包含的fle中永远不起作用,mysql,connection-string,Mysql,Connection String,每当我使用单独的文件存储DB连接详细信息时: <? $username = "xxx"; $password = "xxx"; $database = "xxx"; ?> 谁能告诉我为什么我要这么做?我真的想把我的详细资料另存一个档案 谢谢 include_once('path_to_the_file/db_details.php') 你必须包括这个文件 此外,请不要使用MySQL,而是使用MySQLi或PDO。MySQL已弃用,不再维护 include_once('path_t

每当我使用单独的文件存储DB连接详细信息时:

<?
$username = "xxx";
$password = "xxx";
$database = "xxx";
?>
谁能告诉我为什么我要这么做?我真的想把我的详细资料另存一个档案

谢谢

include_once('path_to_the_file/db_details.php')
你必须包括这个文件

此外,请不要使用MySQL,而是使用MySQLi或PDO。MySQL已弃用,不再维护

include_once('path_to_the_file/db_details.php')