You are here: Re: uploading a pdf « PHP Programming Language « IT news, forums, messages
Re: uploading a pdf

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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация