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>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!