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 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制