我有以下代码示例upload3.@R_301_461@:
<html> <head> <title>@R_301_461@ Form Upload</title> </head> <body> <form method='post' action='upload3.@R_301_461@' enctype='multipart/form-data'> Select a File: <input type='file' name='filename' size='10' /> <input type='submit' value='Upload' /> </form> <?@R_301_461@ if (isset($_POST['submit'])) { echo "isset submit"; } else { echo "NOT isset submit"; } ?> </body> </html>
代码始终返回“NOT isset submit”.
为什么会这样?因为相同的脚本upload3.@R_301_461@调用自己?
您没有名为的提交按钮:
更改
更改
<input type='submit' value='Upload' />
至:
<input type='submit' value='Upload' name="submit"/>