Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写上传文件代码,但是当我运行时,它显示:未定义变量:HTTP_POST_FILES 我该如何解决这个问题?
$a=$HTTP_POST_FILES['ufile']['name'];
您是否在 PHP 配置中将 register_global 指令设置为 ON ?
再加上尝试使用$_FILES而不是$HTTP_POST_FILES,因为这最后一个现在变老了
$_FILES
$HTTP_POST_FILES
这只是意味着你没有定义$HTTP_POST_FILES
定义它,你应该很好。
如果您尝试使用现已弃用的$HTTP_POST_FILES,请不要使用。 改为使用$_FILES。