php+mysql出现了404问题,求解!
404错误:HTTPStatus404-/lyb/Practicalraining/show.phptypeStatusreportmessage/lyb/Practic...
404错误:
HTTP Status 404 - /lyb/Practicalraining/show.php
type Status report
message/lyb/Practicalraining/show.php
descriptionThe requested resource (/lyb/Practicalraining/show.php) is not available.
Apache Tomcat/6.0.32
show.php代码:
<?
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "gbook";
$sql = "SELECT * FROM gbook ORDER BY 'id' DESC";
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
while($row = mysql_fetch_row($result))
{
if($row[2]==1)
{ $gender = '男';}
else
{ $gender = '女'; }
?>
<table width="752" border="1">
<tr>
<td height="32"><p><?=$row[6]?> <?=$row[5]?> </p>
<p><?=$row[1]?>(<?=$gender?>) <?=$row[3]?></p></td>
</tr>
<tr>
<td height="45"><?=nl2br($row[4])?><p><a href="change.php?id=<?=$row[0]?>">[修改]</a> <a href="del.php?id=<?=$row[0]?>">[删除]</a></p></td>
</tr>
</table>
<hr />
<?
}
mysql_free_result($result);
?>
请问是mysql数据库的问题还是代码问题?求解!!! 展开
HTTP Status 404 - /lyb/Practicalraining/show.php
type Status report
message/lyb/Practicalraining/show.php
descriptionThe requested resource (/lyb/Practicalraining/show.php) is not available.
Apache Tomcat/6.0.32
show.php代码:
<?
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "gbook";
$sql = "SELECT * FROM gbook ORDER BY 'id' DESC";
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
while($row = mysql_fetch_row($result))
{
if($row[2]==1)
{ $gender = '男';}
else
{ $gender = '女'; }
?>
<table width="752" border="1">
<tr>
<td height="32"><p><?=$row[6]?> <?=$row[5]?> </p>
<p><?=$row[1]?>(<?=$gender?>) <?=$row[3]?></p></td>
</tr>
<tr>
<td height="45"><?=nl2br($row[4])?><p><a href="change.php?id=<?=$row[0]?>">[修改]</a> <a href="del.php?id=<?=$row[0]?>">[删除]</a></p></td>
</tr>
</table>
<hr />
<?
}
mysql_free_result($result);
?>
请问是mysql数据库的问题还是代码问题?求解!!! 展开
4个回答
展开全部
看到404证明你访问的页面不存在 看一下你的配置吧 iis还是apache 一看就是新手
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
代码没有问题,估计你的Tomcat没配置好
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询