ok - please forgive me if i dont make sence - ill try to explain what i want
to do
i have an file that i want to change a few srings in it (its a .htm file)
i use the str_replace funtion to replace the nessasary strings - i then want
to include the result in the php file that is doing the changes.
this is what i have got
MY index.php file is as per below
------------------
<?PHP
$file=implode(" ",file("main.ht ml"));
$file=str_repla ce("$stringToFi nd","$NewString ", $file);
echo $file;
?>
--------------------
but this doesnt parse any php that is in $file
i thought a way around this would be to save $file as say file.tmp and then
use an include statement to include this. then delete file.tmp
is there any other way around it
thanks
to do
i have an file that i want to change a few srings in it (its a .htm file)
i use the str_replace funtion to replace the nessasary strings - i then want
to include the result in the php file that is doing the changes.
this is what i have got
MY index.php file is as per below
------------------
<?PHP
$file=implode(" ",file("main.ht ml"));
$file=str_repla ce("$stringToFi nd","$NewString ", $file);
echo $file;
?>
--------------------
but this doesnt parse any php that is in $file
i thought a way around this would be to save $file as say file.tmp and then
use an include statement to include this. then delete file.tmp
is there any other way around it
thanks
Comment