| 
 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
 
  
Navigation:
[Reply to this message] 
 |