Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- change using str_replace then parse php
December 5, 2004, 10:54 pm
rate this thread
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
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
Re: change using str_replace then parse php
Well ok, I meant unless there is no other solution, just worded it
badly, and one of the comments on the function page contains the quote
"If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP"
- Janwillem Borleffs
December 5, 2004, 5:26 pm