dongzi1397 2014-10-17 16:12
浏览 69
已采纳

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

I'm trying to impliment a custom form in a Wordpress page. I've set the form up and like so:

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

  <input type="submit" />
</form>

handleForm.php:

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

app.yaml(in addition to the default Wordpress stuff in there):

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

The handleForm.php file is in the root folder beside the app.yaml file.

When I submit the form, it goes to the correct URL, but nothing happens... I would expect it to echo at least Fire. Any insight as to what's going on here? Am I missing something with regard to Wordpress or GAE?

  • 写回答

1条回答 默认 最新

  • dshgdhdfcas30210 2014-10-18 09:36
    关注

    The additional .php file has to be in the root/wordpress folder and prefixed with wp-. For example:

    root/wordpress/wp-handleForm.php 
    

    Then the action attribute of the form tag must be set as /wp-handleForm.php.

    <form method="post" action="/wp-handleForm.php">
    </form>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?