Current location: Hot Scripts Forums » Programming Languages » PHP » PDF file upload


PDF file upload

Reply
  #1 (permalink)  
Old 08-15-05, 08:21 AM
php4tric php4tric is offline
New Member
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
PDF file upload

Hi all,

I have a form with file-upload. If i want to upload an image, i have no problems, but if i want to upload a PDF, the file is being uploaded, but when i want to open it afterwards (link on webpage) it can't be opened. It seems like the file is damaged.

here comes my code

PHP Code:

 // PDF File

if(is_uploaded_file($_FILES['jobpdf']['tmp_name'])) {
echo 
"yes uploaded";
$jobpdf $_FILES['jobpdf']['name'];
//copy ($_FILES['jobpdf']['tmp_name'], "../downloads/jobs/".$_FILES['jobpdf']['name']);
move_uploaded_file($_FILES['jobpdf']['tmp_name'], "../downloads/jobs/".$_FILES['jobpdf']['name']);

What am i doing wrong? Do I have to use a different function? Encode/Decode the PDF file?

Thank you very much for all help?

cheers
tric
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload .xls file from client's machine to SQL Server table bubberz ASP.NET 0 08-09-05 02:40 PM
ASP upload prob minority ASP 1 06-27-05 08:35 AM
file upload csmaster2005 PHP 1 06-16-04 06:57 PM
Upload Script Problem!!! seanknighton Perl 0 03-21-04 09:54 PM
Upload file type and size limiter! Arctic ASP 1 08-02-03 07:06 PM


All times are GMT -5. The time now is 07:01 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.