doukuangxun5382 2014-07-18 16:09
浏览 40

网页在错误的位置被引用

I'm following the beginner tutorial "Creating a Database Driven Application With PHP" in net beans.

I created the wishlist.php file that is referenced in the index.php file. When I run the index.php file:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <form action="wishlist.php" method="GET" name="wishList">
      Show wish list of: <input type="text" name="user" value=""/>
        <input type="submit" value="Go" />
        </form>
    </body>
</html>

the form comes up. I enter 'tom' and select the 'go' button.

According to the tutorial an empty page with the following URL should appear:

 http://localhost:90/Lesson2/wishlist.php?user=tom

I get a webpage with the message:

This webpage is not found

and upon selecting 'more':

No webpage was found for the web address:
file:///C:/Users/Peter/AppData/Local/Temp/wishlist.php?user=tom Error
code: ERR_FILE_NOT_FOUND"

I don't know where the path "C:/Users/Peter/AppData/Local/Temp/" came from.

  • 写回答

1条回答 默认 最新

  • donglv9116 2014-07-18 16:20
    关注

    Basically there is nothing wrong the posted part of your script. As you can see your form redirects to the page it should redirect to. PHP is not even executed so we are assuming this will work when it is triggered correctly ;-)

    But as I can see in your error description you are running the script locally in your home folder of your PC. Is there an webserver running? For executing PHP scripts you basically need to run a PHP service - usually a webserver like apache2.

    If you don't have one try XAMPP which will install an apache webserver on your local PC.

    评论

报告相同问题?

悬赏问题

  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教