|
Posted by Kimmo Laine on 02/27/06 15:17
"Stephen Preston" <stephen_preston@btconnect.com> wrote in message
news:dturb3$5jq$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> I'm trying to upload a pdf file using the $_FILES built in array
>
> It gets stalled at this point and displays the echo
>
> if(!ereg("image",$_FILES['pix']['type']))
> {
> echo "<b>File is not a picture. Please try another
> file.</b><br>";
> include("illustup.inc");
> exit();
>
> This is the content of the $_FILES array
> Array ( [name] => 000.pdf [type] => application/pdf [tmp_name] =>
> C:\PHP\uploadtemp\php2D.tmp [error] => 0 [size] => 26596 )
>
> is it the 'type' thats wrong or the "image", I'm assuming I'm missing
> something in the mime type.
>
> If I try to load a gif file using the same script, it works fine.
>
Either "image" doesn't match "application/pdf" or the Gods of Php just hate
you. I'm guessing the former.
--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviφ
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|