在dw中制作了一个表单,保存为php文档,post方式提交到另外一个welcome的php文档,装了xampp,打开了apache,可是表单提交的时候提示
Object not found!The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.If you think this is a server error, please contact the webmaster.Error 404localhost
Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19
请问是什么问题啊
Object not found!The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.If you think this is a server error, please contact the webmaster.Error 404localhost
Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19
请问是什么问题啊
<form action="welcome.php" method="post">
<p>name:<input name="name" type="text" size="20" /></p>
<p>age :<input name="age" type="text" size="20" /></p>
<p><input name="" type="submit" /></p>
</form>
<?php
phpinfo(); 看是否能出来php信息
是不是我在设置站点的时候,还是存在问题啊
这是提交后的地址:file:///D:/Phpsite/practise/php/test2/welcome.phpD:/Phpsite 是我的xampp指定的目录
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head><body>
<?php echo date('Y-m-d H:i:s');
?>
<br/>
<?php echo strlen('gaosong gaosong gaosong');
?>
<br/>
<?php echo strpos('abc efd hij','h');
?>
<br/>
<?php echo date('D');
?>
<form action="welcome.php" method="post">
<p>name:<input name="name" type="text" size="20" /></p>
<p>age :<input name="age" type="text" size="20" /></p>
<p><input name="" type="submit" /></p>
</form>
</body>
</html>
welcome页面的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head><body>
name is<?php echo $_POST['name'];
?>
age is<?php echo $_POST['age'];
?>
<?php echo phpinfo();
?>
</body>
</html>
是我在新建站点的时候,站点的目录错了,应该就是服务器目录本身,而我错在,在服务器目录下新建了一个目录,然后用新建的目录做了站点,所以链接的文件找不到!
“jordan102”谢谢你给的大力帮助!