我對php編程非常陌生,特別是在eclipse中。我遇到了以前沒有發生過的這個問題。窗體中的動作是打印文件名而不是調用動作的php文件?
我的文件被稱爲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>
謝謝
發佈完整的index.php – 2011-09-19 00:13:58
謝謝Dagon,我發佈了我正在使用的完整代碼。另外index.php是唯一的代碼,所以我打電話給同一個文件。 – Louis
你在瀏覽器中測試過嗎,FF,IE,Chrome等? – tttony