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" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 24 Sep 2004 16:15:19 +0530, Divick Kishore > <[EMAIL PROTECTED]> 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php