[PHP] Re: problem with $HTTP_POST_FILES

2001-08-22 Thread bill

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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: problem with $HTTP_POST_FILES

2001-08-22 Thread Jason Dulberg

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




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]