2016-07-04 59 views
0

所以我得到这个警告,我不知道如何解决它。它用于我的连接文件到我的数据库。如何修复未能打开流?

Warning: require(includes/connect.inc.php): failed to open stream: No such file or directory in /customers/5/e/6/gixter.dk/httpd.www/index.php on line 4 Fatal error: require(): Failed opening required 'includes/connect.inc.php' (include_path='.:/usr/share/php') in /customers/5/e/6/gixter.dk/httpd.www/index.php on line 4 

我的连接文件是这样的:

<?php 
$conn_error = 'Cound not connect to database.'; 

$mysql_host = 'xxxxx'; 
$mysql_user = 'xxxxx'; 
$mysql_pass = 'xxxxx'; 
$mysql_db = 'xxxxx'; 

if ([email protected]_connect($mysql_host, $mysql_user, $mysql_pass) or [email protected]_select_db($mysql_db)){ 
    die($conn_error); 
} 
?> 

谁能帮助?

回答

0

您指定的路径不正确。该文件不存在或无法在该文件夹中找到。它可能处于更高层次。 (../)

不再支持mysql扩展,请查看mysql_i扩展或PDO。 Mysql已被弃用,并且容易受到SQL注入的影响。

Mysql_i

PDO

相关问题