andreyk47 Posted March 20, 2007 Share Posted March 20, 2007 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 More sharing options...
redarrow Posted March 20, 2007 Share Posted March 20, 2007 http://www.phpclasses.org/browse/file/6883.html Link to comment https://forums.phpfreaks.com/topic/43423-opening-mht-file-in-the-browser/#findComment-210962 Share on other sites More sharing options...
andreyk47 Posted March 20, 2007 Author Share Posted March 20, 2007 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 Link to comment https://forums.phpfreaks.com/topic/43423-opening-mht-file-in-the-browser/#findComment-211429 Share on other sites More sharing options...
andreyk47 Posted March 21, 2007 Author Share Posted March 21, 2007 any more ideas? anyone? Link to comment https://forums.phpfreaks.com/topic/43423-opening-mht-file-in-the-browser/#findComment-211735 Share on other sites More sharing options...
paggps Posted June 21, 2007 Share Posted June 21, 2007 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 Link to comment https://forums.phpfreaks.com/topic/43423-opening-mht-file-in-the-browser/#findComment-279480 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.