找不到PHP脚本HTTP 404错误

找不到PHP脚本HTTP 404错误,php,wordpress,authentication,action,Php,Wordpress,Authentication,Action,我目前的任务是在WordPress上创建一个完整的主题。这是一个登录系统。现在,我已经创建了表单,一切看起来都很好,问题是wordpress正在与我争吵,无法找到我的注册脚本,它创建了一个HTTP 404错误。现在我认为这与wordpress permalink系统有关,因为它希望找到一个页面,而不是我的signup.inc.php脚本 现在这让我很沮丧,因为我对编码有点陌生,我不知道如何修复它 这是我的代码链接到名为“includes”的文件夹中的实际文件 <form action=

我目前的任务是在WordPress上创建一个完整的主题。这是一个登录系统。现在,我已经创建了表单,一切看起来都很好,问题是wordpress正在与我争吵,无法找到我的注册脚本,它创建了一个HTTP 404错误。现在我认为这与wordpress permalink系统有关,因为它希望找到一个页面,而不是我的
signup.inc.php
脚本

现在这让我很沮丧,因为我对编码有点陌生,我不知道如何修复它

这是我的代码链接到名为“includes”的文件夹中的实际文件

  <form action='includes/signup.inc.php' method="post">
      <div class="form-group">
        <label for="Username">Username</label>
        <input type="text" class="form-control" name="uid" id="uid" placeholder="Username" required>
        <small id="userhelp" class="form-text text-muted">This name will show on forums and the socialpage.</small>
      </div>

      <div class="form-group">
        <label for="firstname">Firstname</label>
        <input type="text" class="form-control" name="firstname" id="firstn" placeholder="Firstname" required>
      </div>

      <div class="form-group">
        <label for="lastname">Lastname</label>
        <input type="text" class="form-control" name="lastname" id="lastn" placeholder="Lastname" required>
      </div>
      <div class="form-group">
      <label for="email">Email Adress</label>
      <input type="email" class="form-control" name="mail" id="inputemail" aria-describedby="emailHelp" placeholder="Email" required>
      <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
      </div>

      <div class="form-group">
        <label for="password">Password</label>
        <input type="password" class="form-control" name="pwd" id="password" placeholder="Password" required>
      </div>

      <div class="form-group ">
        <label for="password">Repeat password</label>
        <input type="password" class="form-control" name="pwd-repeat" id="password" placeholder=" Repeat password" required>
        <small id="passHelp" class="form-text text-muted">Please retype your password.</small>
      </div>

  <div class="form-group">
    <div class="form-check">
      <input class="form-check-input" type="checkbox" id="invalidCheck3" required>
      <label class="form-check-label" for="invalidCheck3">Agree to terms and conditions</label>
      <div class="invalid-feedback">
        You must agree before submitting.
      </div>
    </div>
  </div>
      <button class="btn btn-dark" name="signup-submit" type="submit">Signup</button>
    </form>

用户名
这个名字将出现在论坛和社交网页上。
名字
姓氏
电子邮件地址
我们永远不会与其他人共享您的电子邮件。
密码
重复密码
请重新输入密码。
同意条款和条件
提交前必须同意。
报名

请以以下形式使用此操作:

<form action='<?php echo get_template_directory_uri(); ?>/includes/signup.inc.php' method="post">

首先,这不应该在WordPress的“外部”处理,而是作为一个合适的插件或其他东西来实现…“现在我认为这与WordPress permalink系统有关”-事实并非如此(除非你在默认路由方面弄乱了WP的功能)-对物理上存在的文件或文件夹的所有请求都由it单独处理。
action='includes/signup.inc.php'
是否查找正确的位置?这不应该是相对的吗?比如:
action='/includes/signup.inc.php'
或者类似的东西。甚至只是在
includes
前面添加
/
谢谢你的回答,但是我已经在页面上实现了页眉和页脚,作为一个单独的页面,我使用了
页面登录页面。php
我真的尝试了所有方法来访问该文件。我真的不知道它指向哪里,因为它是一条404信息,这意味着它找不到!也许我缺少某种代码?好的,我已经更新了我的答案,请检查
get\u template\u directory\u uri()
此函数将为您提供主题文件夹的路径,因此您从该函数获得的路径为->
http://localhost/wordpressfolder/wp-content/themes/themename/
所以我们的道路最终变成了
http://localhost/wordpressfolder/wp-content/themes/themename/includes/signup.inc.php
请根据需要设置路径但不要添加静态,请按我提到的函数设置