Re: problem with $HTTP_POST_FILES

From: Date: Wed, 22 Aug 2001 14:31:17 +0000
Subject: Re: problem with $HTTP_POST_FILES
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63905@lists.php.net to get a copy of this message
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 (#63905) next »