Results 1 to 3 of 3

Thread: [Resolved] Read file to output in the browser (IE specific)

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    [Resolved] Read file to output in the browser (IE specific)

    I'm looking for a method to embed the document in the browser (in IE). I have a

    Code:
    <?php
    	require_once(dirname(__FILE__) . '/../../lib/lekoi/helper/WebHelper.php');
    	$relativePathFilename = 'PFC-1000-6-5546.vsd';
    	$filename = '/tmxpage/apache/htdocs/changecontrol/' . $relativePathFilename;
    	$path = pathinfo($filename);
    	header('Content-Type: ' . get_content_type($path['extension']));
    	header('Content-Transfer-Encoding: binary');
    	header('Content-Length: ' . filesize($filename));
    	header('Content-Disposition: attachment; filename="' . basename($filename) . '"');
    	
    	@readfile($filename);
    ?>
    But it'll open the document in another window. I want to show it like this.
    Attached Images Attached Images  
    Last edited by nebulom; Mar 17th, 2008 at 10:39 PM.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Read file to output in the browser (IE specific)

    Content-disposition: inline

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: Read file to output in the browser (IE specific)

    Thanks PG.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width