RE: problem with $HTTP_POST_FILES

From: Date: Wed, 22 Aug 2001 17:54:22 +0000
Subject: RE: problem with $HTTP_POST_FILES
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63945@lists.php.net to get a copy of this message
Now I just feel like an idiot... that was the answer! I had all the other globals registered but that one. Thanks for your time! Jason. > If they're empty but phpinfo displays them you're probably inside > a function and haven't declared HTTP_POST_FILES as global. > > Jason Dulberg wrote: > > > I am working on an image upload script and I've tried to use > the variables > > from $HTTP_POST_FILES however it seems that no matter how I try > to get the > > variables, they are always empty -- even though they are populated when > > checking phpinfo(); > > > > HTTP_POST_FILES["binFile"] > > Array > > ( > > [name] => arrow-block.gif > > [type] => image/gif > > [tmp_name] => /var/tmp/phph60272 > > [size] => 857 > > ) > > > > I got some info on it from php.net and attempt to echo as they > have on their site however it displays nothing. > > > > echo $HTTP_POST_FILES['binFile']['name']."<br>"; > > > > I am attempting to get size/extension of the file to determine > if its a valid extension and within the valid filesize range. > > > > Is this a server issue or just my php newbie-ness? If anyone > has any ideas on how I can get this working, please let me know. > > > > Thanks. > > > > __________________ > > Jason Dulberg > > Extreme MTB > > http://extreme.nas.net > >

« previous php.general (#63945) next »