Hello,

Can anyone help me embed a .mht file into a php page? I don't want it to be downloaded, but visitors should be able to browse that mht file.

Recommended Answers

This works in IE and maybe Opera but it probably won't work in other browsers:

<iframe src ='test_mht_arch_page.mht' width='100%' height='800'>
          <p>Your browser does not support iframes.</p>
     </iframe>

There are programs to extract html from an MHT so that's another option.

Jump to Post

All 3 Replies

This works in IE and maybe Opera but it probably won't work in other browsers:

<iframe src ='test_mht_arch_page.mht' width='100%' height='800'>
          <p>Your browser does not support iframes.</p>
     </iframe>

There are programs to extract html from an MHT so that's another option.

Hi,

I gave it a try, but id doesn't seem to work.

This works in IE and maybe Opera but it probably won't work in other browsers:

<iframe src ='test_mht_arch_page.mht' width='100%' height='800'>
          <p>Your browser does not support iframes.</p>
     </iframe>

There are programs to extract html from an MHT so that's another option.

I had the same problem but I was using cgi and the only method I could find was to rename the cgi to .mht and put a .htaccess file that made .mht files in that folder execute as cgi-s.

AddHandler cgi-script .cgi

Options +ExecCGI

AddHandler cgi-script .mht

Then in the cgi/mht I would read the content of the real .mht and output it.

I think a similar technique could be used in your case

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.