开发者

can $_FILES superglobal be accessible in class

Does anyone have experience wi开发者_StackOverflow社区th this

I wanted to use $_files in my class

like

$Uploadfile= $_FILES['file'];

but then the script errors

I thought superglobals were acccessible anywhere

thanks, Richard


Yes, $_FILES is a superglobal, which means that it's accessible from every scope. It's only set if the request actually contains a multipart/form-data body.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜