Jump to content

lonewolf277

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lonewolf277's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well, seemed to figure it out myself, so here's my solution to anyone who might be having the same sort of problem: [code] // $content_type is something like 'application/vnd.ms-powerpoint'... // $file_name is usually 'presentation.ppt'... // $length is just the file length, in bytes... // $file is the file data, taken from the blob in the DB... header ("Content-type: " . $content_type); // this line was changed... //header ("Content-Disposition: attachment; filename=" . $file_name); // to this... header ("content-Disposition: inline; filename=" . $file_name); header ("Content-length: " . $length); echo $file; exit(); [/code] Hope this helps! 8)
  2. Hmmm... interesting problem. :) I'm assuming you can send mail to the address from something like GMail or Thunderbird? What headers are you using? Are you hard-coding the e-mail address in, or are you getting it from somewhere else like a database?
  3. Hey everybody, not sure if this should go into the HTML help section, or maybe even in the database section under MySQL, but I'm using PHP code, so I thought I'd try here first. Sorry if it's a mis-post! ;) I'm having a problem with using headers to allow a user to save a file which is stored as a blob in a database [MySQL]. Specifically, when the user clicks on a link to the file, I have a 'getFile.php' file which gets the data from the database, and sends it to the user, using headers [code below]. The problem is, if the user selects "Open", then the file isn't displayed, something about how the "path or file name is invalid". Even more interestingly, the problem only seems to exist in IE, and the PHP works fine in Firefox! Here is the code snippet [runs when the user clicks on the link for a file]: [code] // $content_type is something like 'application/vnd.ms-powerpoint'... // $file_name is usually 'presentation.ppt'... // $length is just the file length, in bytes... // $file is the file data, taken from the blob in the DB... header ("Content-type: " . $content_type); header ("Content-Disposition: attachment; filename=" . $file_name); header ("Content-length: " . $length); echo $file; exit(); [/code] Has anyone experienced anything like this before? I've tried searching for hours with no luck! Thanks in advance for any help anyone can give me! A side note: someone just suggested to me that perhaps IE doesn't completely load the file before it tries to open it in the associated program. Not sure if that helps... ???
  4. Wow, thank you for the great response! I didn't expect this much attention to my post so soon! [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] I'm off to check out AJAX stuff, will post any useful information I find [other than the stuff already posted here]...
  5. This is my first post, so I'll try make it a good one [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] Is it possible to stop a PHP script in order to update a status display, then finally resume the script? I'm creating a mailing system, which I want to include some form of status information as far as the mail sending progress goes. I'm trying to mail off around 2000 custom emails, taking about 10 minutes in total. I would like a status screen / window / div / something which will tell me how far it is, and how many it still has to fire off. I've tried everything from div's to popups, using sleep() and usleep(), practically everything short of a java applet, which would ultimatelly not be suitable. It seems my status I'm trying to update only displays once the page has finished the script, even if I put echo's inside the while loop which sends the mail messages! Any help will be greatly appreciated! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.