Jump to content

Opening mht file in the browser


andreyk47

Recommended Posts

Hello guys,

I have an .mht files saved above the public root and i need php to open it and display in the browser as a regular page.

Is there any way to do it.

I tried something like:

 

header("Content-Type: text/html");
include "/usr/home/sites/documents/doc_39.mht";

and it wouldn't work. It gives me just a huge number of characters.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/43423-opening-mht-file-in-the-browser/
Share on other sites

yes i know this site. This is actual the class i am using to generate mht file.

After creating the file i put it above the root folder.

 

What i want to do now is to included that file inside a .php file. I want to do for security reason, so that only logged in users can have an access to this file. So i am trying to do include ("filepath"); but since mht is not really html, it requires some sort of header i assume or something like that. I am not sure. And that's what the question is about. How do i invlude the file so it gets properly displayed and recognized by the browser

  • 3 months later...

Andreyk47,

I just wanted to know if you finally solved your problem, and how, because I'm having exactly the same problem.

 

I have started a post here:

http://www.phpfreaks.com/forums/index.php/topic,146177.0.html

 

Thanks for any help !!

Pablo.

 

 

 

Hello guys,

I have an .mht files saved above the public root and i need php to open it and display in the browser as a regular page.

Is there any way to do it.

I tried something like:

 

header("Content-Type: text/html");
include "/usr/home/sites/documents/doc_39.mht";

and it wouldn't work. It gives me just a huge number of characters.

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.