PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #61  
Old July 3rd, 2003, 07:31 PM
YettiDesign YettiDesign is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Brisbane, Australia
Posts: 5 YettiDesign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i added the line:
header("Content-Disposition: attachment; filename=\"$file\"\n");


this seem's to work


why i didnt think f it to start with!!

Reply With Quote
  #62  
Old July 11th, 2003, 04:37 PM
cquillen cquillen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Texas
Posts: 1 cquillen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm able to upload files, but had to make some changes to the code. I'm using php 4.2.2-8.0.8 on a Linux box.

File: grabfile.php
global $strDesc;
global $fileUpload;
global $fileUpload_name;
global $fileUpload_size;
global $fileUpload_type;

$strDesc = $_POST["strDesc"];
$fileUpload = $_FILES["fileUpload"]["tmp_name"];
$fileUpload_name = $_FILES["fileUpload"]["name"];
$fileUpload_size = $_FILES["fileUpload"]["size"];
$fileUpload_type = $_FILES["fileUpload"]["type"];

File: downloadfile.php
global $blobId;
$blobId = $_GET["blobId"];

The problem I'm having is when I try to download a Word file. Text files are no problem

Reply With Quote
  #63  
Old December 9th, 2004, 08:47 AM
Pozz Pozz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 Pozz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry to bring up a completely ancient thread but I've just been using the tutorial to help me make use of BLOBs in my database. At first I had lots of problems but this thread ironed them all out apart from one.

I can load small files like text files into my database but when I try to load a slightly larger file like a word document it wont let me do it even though the file is still small 80kb. Does anyone have any ideas as to why this is?? Do I need to change a setting in the my.ini file?? I've tried changing some of them but to no avail.

Any help would be most appreciated.

Thanks in advance

Pozz

Reply With Quote
  #64  
Old December 9th, 2004, 12:37 PM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 16
Quote:
Originally Posted by Pozz
Sorry to bring up a completely ancient thread but I've just been using the tutorial to help me make use of BLOBs in my database. At first I had lots of problems but this thread ironed them all out apart from one.

I can load small files like text files into my database but when I try to load a slightly larger file like a word document it wont let me do it even though the file is still small 80kb. Does anyone have any ideas as to why this is?? Do I need to change a setting in the my.ini file?? I've tried changing some of them but to no avail.

Any help would be most appreciated.

Thanks in advance

Pozz


Pozz.
Are you getting any error messages?

Reply With Quote
  #65  
Old December 9th, 2004, 01:15 PM
Pozz Pozz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 Pozz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No mate I;'m not getting any errors at all. The query that inserts the file works fine with a .txt file but any other files, regardless of how small they are, like small .word .jpeg the query just fails and I get the error message that's coded into the PHP "Couldn't Add File To The Database".

It seems a bit odd to me. At first I thought it was the size of the file that was causing the problem but I've submitted larger files 1mb in size and they work fine.

I'm stumped

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > BLOB Tutorial - PHP


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap