Home >Backend Development >PHP Tutorial >$_SERVER和$_FILES是什么意思呢?

$_SERVER和$_FILES是什么意思呢?

WBOY
WBOYOriginal
2016-06-20 12:36:541333browse

这两句话一点都看不懂
if ($_SERVER['REQUEST_METHOD'] == 'POST')  
if (!is_uploaded_file($_FILES["upfile"][tmp_name]))  


回复讨论(解决方案)

if ($_SERVER['REQUEST_METHOD'] == 'POST')  判断请求(此php脚本)的方法是不是post
if (!is_uploaded_file($_FILES["upfile"][tmp_name]))  判断上传的文件是否成功

if ($_SERVER['REQUEST_METHOD'] == 'POST')  判断请求(此php脚本)的方法是不是post
if (!is_uploaded_file($_FILES["upfile"][tmp_name]))  判断上传的文件是否成功



$_SERVER和$_FILES是什么意思呢?


if ($_SERVER['REQUEST_METHOD'] == 'POST')  判断请求(此php脚本)的方法是不是post
if (!is_uploaded_file($_FILES["upfile"][tmp_name]))  判断上传的文件是否成功



$_SERVER和$_FILES是什么意思呢?
server获取服务器变量,files获取上传文件的信息。可以查手册或百度看看。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn