gpt4 book ai didi

php - 找不到对象!在此服务器上找不到请求的 URL。未访问 PHP 文件

转载 作者:行者123 更新时间:2023-11-28 03:10:40 24 4
gpt4 key购买 nike

我安装了 Xampp 并运行了一个本地服务器来测试我的 php 代码。所以我制作了一个简单的表单,它有一个提交按钮并且有 action = seenotes.php 和 onSubmit = seenotes.php

问题是当我点击提交时出现错误:找不到对象!在此服务器上找不到请求的 URL。错误 404。

URL 如下所示:http://localhost/MagodaSystems/seenotes.html?note=as&submit=Enter

看到 url 中的 seenotes.html 部分了吗?该文件不存在,我希望将其定向到 seenotes.php。当我手动将链接的那部分更改为 seenotes.php 时,我得到了所需的页面。我该如何解决这个问题,以便它自动重定向到正确的 php 页面?我的所有文件都在 htdocs 中的一个文件夹中。

最佳答案

以这种方式使用表单:

<form method = "post" action = "seenotes.php" >

<!--you can also use method = "GET" as per your requirement.Sice you said all files are in same folder i gave action as the file name
all your input fields are here -->

<input type = "submit" />

</form>

关于php - 找不到对象!在此服务器上找不到请求的 URL。未访问 PHP 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30722337/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com