mluks Posted May 22, 2008 Share Posted May 22, 2008 I have a frame with some html in it. I want to write the html which may have been modified to file. I was under the impression I could do this as follows, but it doesn't work. I was trying to avoid changing to .php for my main file because I call a lot of javascript stuff. from little.html.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Resource Classes Web Editor</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="PageTitle" content="Cross-Browser Rich Text Editor"> </head> <body> <script type="text/javascript" src="little.php?FILE=reminders0.htm&DATA=html"></script> <iframe id="contentFrame" name="contentFrame" src="reminders0.htm"></iframe> </body> </html> And from little.php.... <?php Header("content-type: application/x-javascript"); $FILE = $HTTP_GET_VARS[0]; $Data = $HTTP_GET_VARS[1]; $Handle = fopen($FILE, 'w'); fwrite($Handle, $Data); fclose($Handle); ?> Link to comment https://forums.phpfreaks.com/topic/106706-need-to-write-html-from-a-frame-src-to-file/ Share on other sites More sharing options...
mluks Posted May 22, 2008 Author Share Posted May 22, 2008 Sorry...that probably needs more explanation. The iframe is basically meaningless in the code I included...I just stuck it in there for reference. My main problem is getting the external PHP file to work. The idea is that I wouldn't have to change the .html to a .php. Instead I could just "call" the .php file from the .html file. Link to comment https://forums.phpfreaks.com/topic/106706-need-to-write-html-from-a-frame-src-to-file/#findComment-547028 Share on other sites More sharing options...
prcollin Posted June 3, 2008 Share Posted June 3, 2008 Sorry...that probably needs more explanation. The iframe is basically meaningless in the code I included...I just stuck it in there for reference. My main problem is getting the external PHP file to work. The idea is that I wouldn't have to change the .html to a .php. Instead I could just "call" the .php file from the .html file. just type include("filename"); at the top of your html file Link to comment https://forums.phpfreaks.com/topic/106706-need-to-write-html-from-a-frame-src-to-file/#findComment-556192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.