That is for IE and its silly FileName[N] rather than FileName
here a good old function to download:
http://www.devpro.it/code/72.html
Regards
> Date: Sun, 6 Sep 2009 15:43:27 -0300
> From: tapi...@gmail.com
> To: chris_pa...@danmangames.com
> CC: php-general@lists.php.net
> Su
I think that your problem in this line:
header("Content-Disposition: filename=$file" . "%20");
I don't know what that %20 is for and you should quote the filename,
that line should be something like this:
header("Content-Disposition: attachment; filename=\"$file\"");
Considering that $filenam
At 3:32 PM +0100 8/19/08, Ashley Sheridan wrote:
That bug report makes sense now, in light of your problem. It wasn't
something I'd ever seen happen before, as most of my work is done on
Linux, and the bug seems to be specific to the way Windows uses the
BOM for UTF-8 PHP files.
Ash:
A probl
That bug report makes sense now, in light of your problem. It wasn't
something I'd ever seen happen before, as most of my work is done on
Linux, and the bug seems to be specific to the way Windows uses the BOM
for UTF-8 PHP files.
Ash
www.ashleysheridan.co.uk
--- Begin Message ---
I just add this
I just add this comment for reference.
I found this bug report on the PHP Web site:
http://bugs.php.net/bug.php?id=22108
That bug explains everything :)
Stefano
Stefano Noffke wrote:
Thanks for the reply.
I think I found the problem here: The php file was saved with UTF-8
encoding, and for
ysheridan.co.uk
----
Subject:
Re: [PHP] File download problem
From:
Stefano Noffke <[EMAIL PROTECTED]>
Date:
Tue, 19 Aug 2008 15:17:25 +0200
To:
php-general@lists.php.net
To:
php-general@lists.php.net
I checked the files with an HEX editor, and I found that each downloaded
file starts with "EFBB
I had a similar problem with a script I was using to stream video clips
to a user from a directory that was not accessible through the web.
Turned out I had already sent some HTML content down to the browser
without realising it. I'll go out on a limb here and guess that those
three bytes you're se
I checked the files with an HEX editor, and I found that each downloaded
file starts with "EFBBBF", and after those three bytes follows the
regular file.
If I delete those three bytes, I can open the files just fine.
Now the question is: Why do I get those three extra bytes at the
beginning o
Hi,
Thank you for your reply. I tried your code, but the problem remains. I
still can download PDF, TXT, and MP3 fine, but the ODT, DOC, and JPG are
still corrupted.
I wonder why it works with some files and not with others...
Stefano
Ashley Sheridan ha scritto:
Hi Stefano,
You can use th
Hi Stefano,
You can use this code instead to read in the file and output it to the
browser, as it is binary safe. I've used it for the same reason you
require, and it works fine with video clips.
$fp = fopen($path, "rb");
while(!feof($fp))
{
print(fread($fp, 1024));
flush($fp);
}
fc
On Thu, June 15, 2006 10:17 am, Jon Anderson wrote:
> Richard Lynch wrote:
>> Can any experts on this list explain to me why, despite the
>> 1,000,000
>> places that application/octet-stream is documented to work, and has
>> always worked, since Mosaic 1.0 days, people manage to find these
>> goofb
Richard Lynch wrote:
Can any experts on this list explain to me why, despite the 1,000,000
places that application/octet-stream is documented to work, and has
always worked, since Mosaic 1.0 days, people manage to find these
goofball Content-type: headers that are supposed to work, but only
work
John Holmes wrote:
From: "PHP Junkie" <[EMAIL PROTECTED]>
As my link to the download file, I changed it to
And changed the code in the download file to
How are you validating $F and ensuring it's not a path to any file on
your server?
imsafm_user_dl.php?F=/home/path/to/secret/file.txt
It's a F
From: "PHP Junkie" <[EMAIL PROTECTED]>
As my link to the download file, I changed it to
And changed the code in the download file to
How are you validating $F and ensuring it's not a path to any file on your
server?
imsafm_user_dl.php?F=/home/path/to/secret/file.txt
---John Holmes...
--
PHP G
Ave,
I made a change last evening, and since the change.. It seems to be working
fine. Thus far I haven't had the 1 KB downloaded file problem. I have been
trying all evening and this morning, from different places, and somehow
right now it seems to be working fine.
What I simply did was this:
Chances are your 1KB file contains an error message - try changing the
Content-Type to text/plain or text/html to see what PHP is throwing at you
Cheers
Chris
Marek Kilimajer wrote:
PHP Junkie wrote:
Ave,
I've been having a very nagging and frustrating problem for a while
and I
hope someone can
PHP Junkie wrote:
Ave,
I've been having a very nagging and frustrating problem for a while and I
hope someone can help me out with this.
I created a simple File Manager application, a lot of you already know about
it as you helped me with coding at different stages.
The problem is this: The Downloa
Check the comments on this page:
http://us2.php.net/manual/en/function.session-cache-limiter.php
---John Holmes...
- Original Message -
From: "Andrew Hauger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 11:18 AM
Subject: Re: [PHP]
sposition: attachment;
filename="product.'.$file_ending.'"' );
header ( 'Expires: ' . date ( 'r', 0 ));
Still getting the same behavior, on both the Windows
and Solaris platforms.
Andy
> From: Curt Zirzow [EMAIL PROTECTED]
> Sent: Tuesday, March 30, 2004 9:56
* Thus wrote Andrew Hauger ([EMAIL PROTECTED]):
> the file name. When the "OK" button is clicked, an
> error dialog pops up with the message "Internet
> Explorer cannot download ... [snipped URL]. Internet
> Explorer was not able to open this Internet site. The
> requested site is either unavailabl
Maybe I should clarify this:
I have a the php file:
/var/www/html/dev/view_files_disply.php
This file accepts a POST argument which identifies $filename (example
1392_foobar.txt) of a file stored on the server at:
/var/www/html/files/1392_foobar.txt
This filename is generated by PHP and is there
Found the problem. It is the odbc_connect() that cause the download to fall
short of completing it's download. Weird! I think it's because the
database connection have a slower response time than the download response
time. PHP header should not be affected by the odbc function... But then I
r
> btw, also on the content-disposition, not only will some browsers not
> honor that, they will just use the name of the script as the 'save-as'
> filename.
That's okay with the 'save as' filename because no one know hte real
filename on the webserver because it is renamed when it is download anyw
Um, problem is I don't have any scripts before this sample header function.
So, something is up. Does the file size 49 MB have something to do with it?
Okay, saw both of the replies, so will check them out.
Thanks,
Scott
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
> Hi!
>
> I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to
> cause the webserver to download the file to the web browser. Some
> of the time it work and some of the other time, it doesnt. I
> haven't figured out why un
At 16:15 21-7-03, you wrote:
Hi!
I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to cause the
webserver to download the file to the web browser. Some of the time it work
and some of the other time, it doesnt. I haven't figured out why until I
looked in the error log which showed h
On Friday 04 April 2003 15:29, b b wrote:
> It would be:
> href="downloadFile.php?daFile=path/fileName">path/fileName
>
> I tried to print the _GET['daFile'] however if I am
> using the header function in the same file then it
> won't print a thing.
Well, disable the file downloading section
It would be:
path/fileName
I tried to print the _GET['daFile'] however if I am
using the header function in the same file then it
won't print a thing. In fact it starts downloading.
The only thing is that it doesn't catch the correct
file name (though it downloads the actual daFile).
Cheers,
On Friday 04 April 2003 13:51, b b wrote:
> Why would the $daFile in the following code be
> resolved to "". I am passing it via the url.
> session_start();
> if($_SESSION['isValidSession'] == 'Y'){
> $daFile = $_GET['daFile'];
- What URL are you using?
- Have you t
have the file download in a popup window.
after the down load the window will be gone.
Then you don't have to worry about the refreshing of the main window.
Jim
- Original Message -
From: "David Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 8:30 AM
Su
Simply, HTTP Authentification
Header("WWW-Authenticate: Basic realm='something'")
does not work with microsoft product, so you need to buy Microsoft
authentification from Microsoft to do something like it.
- Original Message -
From: "Rodolfo Gonzalez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTE
the grunt work,
at least. :)
---John Holmes...
> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 11:22 PM
> To: [EMAIL PROTECTED]
> Cc: 'Tom Rogers'; [EMAIL PROTECTED]
> Subject: Re: [PHP] File download do
Yes, you're right. You might want to turn off the forced SSL temporarily
to debug this, if that's possible. Nothing other than your browser or
the Web server will be able to show you the HTTP communication over SSL,
because it's all trash to everything in between.
There may be settings in Oper
> > You can have multiple directives in that header:
> >
> > Cache-Control: no-cache, no-store
> >
> > Do you have a way to view the HTTP?
>
> No. Can you recommend a good method on windows? Should I get lynx or
> does opera have a method to view all the headers?
can't you view all headers etc in
> You can have multiple directives in that header:
>
> Cache-Control: no-cache, no-store
>
> Do you have a way to view the HTTP?
No. Can you recommend a good method on windows? Should I get lynx or
does opera have a method to view all the headers?
---John Holmes...
--
PHP General Mailing L
You can have multiple directives in that header:
Cache-Control: no-cache, no-store
Do you have a way to view the HTTP?
Chris
John W. Holmes wrote:
>I had tried it with both cases, actually, just to be sure. It did not
>make a difference. If the session is sending a no-cache header, would
>the
[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 8:45 PM
> To: Rasmus Lerdorf
> Cc: 1LT John W. Holmes; [EMAIL PROTECTED]
> Subject: Re: [PHP] File download doesn't work with SSL
>
> Are you sure?
>
> I think (I might be wrong) using PHP sessions automatically sends t
Are you sure?
I think (I might be wrong) using PHP sessions automatically sends the
Cache-Control header. I cannot remember what directives it uses.
Perhaps the fact that you do not use correct case makes PHP miss the
fact that you want to reassign Cache-Control to use a different value?
If t
rding this issue?
>
> ---John Holmes...
>
> - Original Message -
> From: "Rouvas Stathis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "1LT John W. Holmes" <[EMAIL PROTECTED]>
> Sent: Monday, October 07, 2002 2:00 PM
>
'excel'");
> > > header("content-disposition: attachment; filename=" . $filename .
> > > ".xls");
> > >
> > > and I'm still getting the same thing. Is the no-cache cache-control
header
> > > s
; code.
> >
> > Any help is appreciated.
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
> > Cc: <[EM
> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 07, 2002 10:08 AM
> Subject: Re: [PHP] File download doesn't work w
sent automatically by PHP at all? I don't have one set explicitly in my
code.
Any help is appreciated.
---John Holmes...
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]&
> Does it work with a different browser? Smells like an IE bug to me.
Doesn't everything with IE smell like a bug?
Anyhow, it works fine with Netscape. Opera will not open the file, but will
save-as just fine when prompted.
I'm off to search MS... help me...
---John Holmes...
> > Everyone,
Does it work with a different browser? Smells like an IE bug to me.
On Mon, 7 Oct 2002, 1LT John W. Holmes wrote:
> Everyone,
>
> I've had a simple download script working where a user would click on a link and the
>program would send word or excel headers instead of HTML. The file would then
On Tue, 23 Apr 2002, .ben wrote:
> I think this is only an issue with an un-patched IE5.01, anything higher
> than that should work fine.
In my experience, there're problems even with MSIE 6.x.
Regards,
Rodolfo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
I think this is only an issue with an un-patched IE5.01, anything higher
than that should work fine.
.b
> -Original Message-
> From: Negrea Mihai [mailto:[EMAIL PROTECTED]]
> Sent: 23 April 2002 12:26
> To: [EMAIL PROTECTED]
> Subject: [PHP] file download in IE
>
>
> Hi!
>
> How on eart
You can just link to the file eg
download file
just make sure the path is correct.
Joe Van Meer wrote:
> Hi there. How would I go about downloading a file off of the server. The
> filename will always be the same in my case. Say it is sitting in a
> directory called 'textfiles'. What method/fun
If you want it to automatically be saved to disk, send the
header("Content-type: octet/stream");
If there is a problem with the open I would think its on the client side
since theres nothing mor the server can do but specify a content type.
-Original Message-
From: Warren Vail [mailto:[
Hello, I had the same problem as you for months!
until someone post this a couple of weeks ago:
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=file.txt");
include("file.txt");
py
- Original Message -
From: Aleksey Yarilovets <[EMAIL P
While we are on the subject,
I made some tests with Apache logs and it seems that Apache writes the size
of the file that you are DL to the log file at the beginning of the
transfer. So if you
are DL a 1MB file apache will write that you have DL a 1MB file and it
doesn't
reflect weather you stopp
On Wednesday, January 31, 2001 at 12:00 PM, "Boaz Yahav"
<[EMAIL PROTECTED]> wrote:
> Seems like your theory doesn't stand the reality test :)
>
> This is the script which for some reason works with Netscape but not with
IE
> (it used to) :
>ignore_user_abort(0);
>$filename="test.gz";
>
essage-
From: Daniel Grace [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] File Download Completion
"Boaz Yahav" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible
.4pl1
any idea?
-Original Message-
From: Daniel Grace [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] File Download Completion
"Boaz Yahav" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news
ry 31, 2001 2:55 PM
To: Boaz Yahav; Php-General
Subject: Re: [PHP] File Download Completion
Hi Berber,
The only way I've figured this at the moment is to use the web server access
logs. They will tell you how many bytes were transfered, if it matches the
file size then transmission was
Hi Berber,
The only way I've figured this at the moment is to use the web server access
logs. They will tell you how many bytes were transfered, if it matches the
file size then transmission was potentialy succesful.
I'm trying to think of a better way using PHP and maybe JavaScript but at
the m
"Boaz Yahav" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible to find out if a client finished to DL a file?
>
> Suppose i put a link to a file and people start to DL the file.
> Some people can stop the DL in the middle. I need to know
> how many
57 matches
Mail list logo