[PHP] Re: uploading images

2003-06-24 Thread Misha Peric
fopen() returns FALSE if it fails, and that's probably what happends here. $_POST is superglobal so register_globals doesn't mean anything to it. Just use the proper functions for filename and filesize: $_FILES['userfile']['name'] $_FILES['userfile']['size'] Of course you should move the uploaded

[PHP] Re: uploading images

2002-03-09 Thread Filippo Veneri
George Whiffen wrote: > Wierd, sounds like it could be a bug. What's the actual code you use > for the upload? > > I presume you are running vim from the command line of the box to which > the image is > uploaded. Content-Type: image/jpeg is, of course, what Apache would add > if you requested

[PHP] Re: uploading images

2002-03-08 Thread George Whiffen
Filippo Veneri wrote: > When uploading image files to my powerpc linux box (derived > from redhat 7.1) running apache + php4.0.4pl1 something > wierd happen. > Images get corrupted by (IMHO) php itself. It adds the > following 2 lines at the top of the file: > > Content-Type: image/jpeg^M > ^M