php - Wordpress:找不到 PHP 脚本 HTTP 404 错误
问题描述
我目前的任务是在 WordPress 上创建一个完整的主题。这就是登录系统。现在,我已经创建了表单,一切看起来都很好,问题是 wordpress 与我争吵并且无法找到我的注册脚本,它会创建一个 HTTP 404 错误。现在我认为这与 wordpress 永久链接系统有关,因为它想要找到一个页面,而不是我的signup.inc.php
脚本。
现在这让我感到沮丧,因为我对编码有点陌生,我不知道如何解决它!
这是我的代码链接到位于名为“包含”的文件夹中的实际文件
<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">
推荐阅读
- android - 如何摆脱我的颤动代码周围的这些奇怪的边界线?(在 android studio 中颤动)
- python - 在 Python 中跨日历季度的财政季度拆分收入
- powershell - 在 foreach 循环的第二次迭代中引用函数中的第二个参数
- git - 是否可以强制“git diff”为不在存储库中的文件显示“相似度索引”
- c - C MPI 并行编程 - 分段错误 11 错误
- python - Pandas 数据框中的 Ping 主机
- javascript - Await 不是在等待 api post 完成,而是同时发生
- java - 生命游戏没有更新网格
- java - javafx Intellij IDEA 索引用户控件
- java - docx4j:docx 到 pdf 的转换 - docx 内容没有逐页显示为 pdf