我有以下内容:
<?php
// Select the images needed for this page
require_once("databasemanager.php");
$database = dfin_connect("hoodie");
$result = mysql_query("SELECT * FROM tblX56rld WHERE filename IN ('img044eam','img077ecc')");
?>
我在根目录中看不到databasemanager.php - 我该如何创建它?
答案 0 :(得分:1)
只需使用以下内容创建databasemanager.php文件:
<?php
$db_host = "localhost"; // change to your MySQL server if needed
$db_user = "database_username"; // change to your MySQL user
$db_pass = "database_password"; // change to your MySQL user's password
$db_name = "database_name"; // change to your MySQL database name
mysql_connect($db_host, $db_user, $db_pass) or die("Can't connect");
mysql_select_db($db_name) or die("Can't select");
?>
答案 1 :(得分:0)
您是否已从其他项目中复制此代码?还是在线资源?
回到那里看看那个文件是否存在。您需要将其复制到您的目录中。如果你自己写的,我不确定你为什么要引用你尚未制作的文件。