创建Facebook画布应用程序时,表单操作应该是什么


What Should be the Form Action When creating Facebook canvas app?

我正在创建Facebook画布应用程序。

应用程序位于 example.com/test/index.php .

这是代码的一部分。

<form action="" method="post">
  <fieldset>
    <legend>Personal information:</legend>
    Enter Text:<br>
    <input type="text" name="FirstText" id="ftext" name="ftext">
    <br>
    <input type="submit" value="Submit">
  </fieldset>
</form>
<?php
  if(isset($_POST["ftext"]))
  {
            ----------
            ----------
  }
?>

我厌倦了"索引.php"、"https://example.com/test/index.php"和"https://example.com/test/"的行动。

但以上任何一项都不起作用。表单操作应该是什么?

如果您没有收到 404 错误,那么问题不是 action 属性。

我建议您打印有关变量的信息(在帖子之前和之后)

<pre><?php print_r($_POST); ?></pre>
<pre><?php print_r($_REQUEST); ?></pre>
<pre><?php print_r($_SERVER); ?></pre>

这应该可以帮助您了解 DE 问题并对其进行调试。