Content Type save as dialog [1] appearing in name??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ryanmhuc@yahoo.com

    #1

    Content Type save as dialog [1] appearing in name??

    I'm sending back a file as the content type but when the file name is
    of test.class.php the file dialog (I'm using IE 6 Windows) saves it as
    test[1].class.php. If I send test.php it saves it as test.php. I need
    it to default save as "test.class.php ". Anyone know why this is and how
    to get around it? Heres the exact code I'm using.

    header('Content-Type: application/octetstream; name="test.clas s.php"');

    header('Content-Type: application/octet-stream;
    name="test.clas s.php"');
    header('Content-Disposition: attachment; filename="test. class.php"');

  • R. Rajesh Jeba Anbiah

    #2
    Re: Content Type save as dialog [1] appearing in name??

    ryanmhuc@yahoo. com wrote:[color=blue]
    > I'm sending back a file as the content type but when the file name is
    > of test.class.php the file dialog (I'm using IE 6 Windows) saves it[/color]
    as[color=blue]
    > test[1].class.php. If I send test.php it saves it as test.php. I[/color]
    need[color=blue]
    > it to default save as "test.class.php ". Anyone know why this is and[/color]
    how[color=blue]
    > to get around it? Heres the exact code I'm using.
    >
    > header('Content-Type: application/octetstream;[/color]
    name="test.clas s.php"');[color=blue]
    >
    > header('Content-Type: application/octet-stream;
    > name="test.clas s.php"');
    > header('Content-Disposition: attachment; filename="test. class.php"');[/color]

    This is IE only bug. Will happen when you use more than one dot in
    file name.

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    Working...