ShaKeD Posted May 7, 2007 Share Posted May 7, 2007 Hey all I`m using php file named test.php, and html file named style.sspic (sspic=my system files.). Now on my php file I have $upframe='my php test file blah blah balh'; $htmlpage = include 'style.sspic'; str_replace('{upframe}',$upframe,$htmlpage); and on my html file I have <html> <head> <title>Untitled 1</title> </head> <body topmargin="0" leftmargin="0" rightmargin="0"> <table style="width: 100%" class="style1"> <tr> echo <td align=center>{upframe}</td> </tr> </table> </body> </head> </html> how can I make it work , that when I open my php file, I will see {upframe} as $upframe ? Thanks for you time and help! Link to comment https://forums.phpfreaks.com/topic/50413-using-str_replace-when-using-html-on-php/ Share on other sites More sharing options...
per1os Posted May 7, 2007 Share Posted May 7, 2007 <?php $upframe='my php test file blah blah balh'; $htmlpage = file_get_conents('style.sspic'); str_replace('{upframe}',$upframe,$htmlpage); include does not get put into a variable it is ran like it was being caled itself. www.php.net/file_get_contents is more of what you are looking for. Link to comment https://forums.phpfreaks.com/topic/50413-using-str_replace-when-using-html-on-php/#findComment-247610 Share on other sites More sharing options...
ShaKeD Posted May 7, 2007 Author Share Posted May 7, 2007 ok , so how can I do this to work, this was my question. another way of course and not include to variable Link to comment https://forums.phpfreaks.com/topic/50413-using-str_replace-when-using-html-on-php/#findComment-247612 Share on other sites More sharing options...
ShaKeD Posted May 7, 2007 Author Share Posted May 7, 2007 works=) thanks! Link to comment https://forums.phpfreaks.com/topic/50413-using-str_replace-when-using-html-on-php/#findComment-247622 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.