php - can $_FILES superglobal be accessible in class -


Does anyone have experience with it

I wanted to use $ _files in my class < / P>

like

  $ uploadfile = $ _FILES ['file'];  

But then the errors of the script

I thought that a superglobe is accessible anywhere

thanks, Richard

Yes, $ _ files is a super global, which means that it is accessible from every scope. It is set only if the request actually contains a multipart / form-data body.


Comments

Popular posts from this blog

MySql variables and php -

php - Laravel - Overriding a resource route into a different route filter group -

url rewriting - How to implement the returnurl like SO in PHP? -