Re: New Line Character while downloading a file!
| From: | Divick Kishore | Date: | Fri, 24 Sep 2004 12:17:23 +0000 |
| Subject: | Re: New Line Character while downloading a file! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197772@lists.php.net to get a copy of this message | ||
Indeed you figured it right. I do have a new line at the top of the
<?php tag. Removing that has solved the problem partially at least the
newline is not being appended. But the problem of file name is still there.
The download popup asks for the file name as DownloadScript.php which
contains the code below.
Anyways Thanks a lot Ramil.
"Ramil Sagum" <ramil.sagum@gmail.com> wrote in message
news:adc98eb5040924050844718141@mail.gmail.com...
> On Fri, 24 Sep 2004 16:15:19 +0530, Divick Kishore
> <divick.kishore@hytechpro.com> wrote:
> >Another problem is that when the file is downloaded a new
> >line character is added to the top of it unncessarily due to which it
can't
> >be opened with any image viewer.
> >Once I reomove that newline character, it works fine.
>
> Maybe that's the key to the problem. You may have a blank line
> somewhere. Something like:
>
> <!--- start of PHP file -->
>
> <?php
>
> code...
>
> ?>
>
> The blank line before the "<?php" tag gets sent out before your
> headers are sent.
> Does the code have this?
>
> HTH
>
>
> ----
>
> ramil
>
> http://ramil.sagum.net