如何解决"The requested URL/mypath was not found on this server?"
How to resolve "The requested URL/mypath was not found on this server?"
我已经下载了 wampserver 并成功地安装在我的电脑上。但是,当我尝试连接到我的数据库时,它显示以下内容:
Not Found
The requested URL /uomwebapplication/init was not found on this
server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80.
请帮帮我。
init.php
<?php
$db_name="uomwebappdb";
$mysql_user="root";
$mysql_pass="root";
$server_name="localhost";
$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name);
if(!$con)
{
echo"Connection Error...".mysqli_connect_error();
}
else
{
echo"<h3>Database connection Success...</h3>";
}
?>
好的,默认情况下 MYSQL 安装了一个名为 root
的用户,该用户没有密码,所以将此代码更改为
<?php
$db_name="uomwebappdb";
$mysql_user="root";
$mysql_pass=""; //<-- changed here
$server_name="localhost";
$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name);
if(!$con) {
echo"Connection Error...".mysqli_connect_error();
} else {
echo"<h3>Database connection Success...</h3>";
}
我已经下载了 wampserver 并成功地安装在我的电脑上。但是,当我尝试连接到我的数据库时,它显示以下内容:
Not Found
The requested URL /uomwebapplication/init was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80.
请帮帮我。
init.php
<?php
$db_name="uomwebappdb";
$mysql_user="root";
$mysql_pass="root";
$server_name="localhost";
$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name);
if(!$con)
{
echo"Connection Error...".mysqli_connect_error();
}
else
{
echo"<h3>Database connection Success...</h3>";
}
?>
好的,默认情况下 MYSQL 安装了一个名为 root
的用户,该用户没有密码,所以将此代码更改为
<?php
$db_name="uomwebappdb";
$mysql_user="root";
$mysql_pass=""; //<-- changed here
$server_name="localhost";
$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name);
if(!$con) {
echo"Connection Error...".mysqli_connect_error();
} else {
echo"<h3>Database connection Success...</h3>";
}