Form中的Action打印文件名,而不是调用Action 's php文件


Action in Form is printing the file name rather than invoking the action's php file?

我是php编程的新手,尤其是eclipse。我遇到了以前没有的问题。

我的文件叫index。php,我只有一个文件,叫index。php,我有这个非常简单的代码在里面。基本上我的代码只调用自己:

<form id="form1" name="form1" method="post" action='index.php'>
      <label>
  <input name="textfield" type="text" id="textfield" />
  </label>
      <label>
      <input type="submit" name="submitcontent" id="submitcontent" value="extract files" />
      </label>
    </form>

当我运行代码并单击提交按钮时,而不是像我在操作请求中那样重新加载index.php,输出是一个带有字符串"index.php"的白页面。我花了几个小时试图找到错误,但毫无希望。

你能告诉我错在哪里吗?

让我想知道的是,如果我在dreamweaver中运行这段代码,它的工作完美,即重新加载index.php,因为它应该做的。

多谢

//编辑:这是要求的完整代码。

在eclipse中,我使用调试作为PHP脚本。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body class="twoColLiqLtHdr">
    <form id="form1" name="form1" method="post" action='index.php'>
      <label>
      <input name="textfield" type="text" id="textfield" />
      </label>
      <label>
      <input type="submit" name="submitcontent" id="submitcontent" value="extract files" />
      </label>
    </form>
</body>
</html>

谢谢

我已经解决了这个问题。以下是我所犯的错误:

1-我的问题不在于PHP或Eclipse,而在于服务器。我的调试器没有正确配置。

2-我正在调试使用PHP脚本,而不是PHP网页。前者可以调试而不需要连接到服务器(只是一个脚本),而后者在服务器上调试网页。

一旦我确保使用php -m正确设置调试器,那么设置PDT就是小菜一碟。