Jump to content

Recommended Posts

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

<?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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.