Wordpress 和 GAE 中的自定义表单处理


Custom Form Handling in Wordpress and GAE

我正在尝试在Wordpress页面中暗示自定义表单。我已经设置了表单,如下所示:

<form method="POST" action="/handleForm.php">
  <input type="text" name="userName" />
  <input type="submit" />
</form>

句柄表单.php:

echo($_POST['userName']);
echo('Fire');

app.yaml(除了默认的Wordpress内容(:

- url: /handleForm.php
  script: handleForm.php

handleForm.php文件位于app.yaml文件旁边的根文件夹中。

当我提交表单时,它会转到正确的 URL,但没有任何反应......我希望它至少echo Fire.关于这里发生了什么的任何见解?我是否错过了有关WordpressGAE的内容?

附加的

.php文件必须位于root/wordpress文件夹中,并以 wp- 为前缀。例如:

root/wordpress/wp-handleForm.php 

然后,必须将form tagaction属性设置为 /wp-handleForm.php

<form method="post" action="/wp-handleForm.php">
</form>