我在 xampp 的 phpmyadmin 中创建了我的数据库“MUSIC”。我正在尝试使用我存储在 OML 文件夹中的 php 文件连接到该数据库,该文件夹又存在于 htdocs 文件夹中,我的代码是:
$db_name="MUSIC";
$db_user="root";
$db_pwd="ash123";
$db_host="localhost";
$connect = mysql_connect("localhost","root","ash123");
mysql_select_db("MUSIC");
echo "connection successful";
但是当我去 localhost 并输入localhost/connect.php
时,我收到了这个错误:
Object not found!
the requested URL was not found on this server.if u entered the URL manually please check your spelling and try again.If you think this is a server error,please contact webmaster.
Error 404
localhost
Apache/2.4.3 (Unix) OpenSSL/1.0.1c PHP/5.4.7
我已经搜索过,但我找到了解决此问题的方法,请帮助!