Reply to uploading a pdf

Your name:

Reply:


Posted by Stephen Preston on 02/27/06 14:29

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.

Thanks in anticipation

Stephen

[Back to original 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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация