|
Posted by dawnerd on 08/05/06 00:03
Alvaro G. Vicario wrote:
> *** magic_hat60622 escribió/wrote (4 Aug 2006 09:31:59 -0700):
> > $fh=fopen('./emails/confirmation/index.html', 'r') or die
> > ($php_errormsg) ;
> > while (! feof($fh)){
> > $body.=fread($fh,filesize('./emails/confirmation/index.html'));
> > }
> >
> > PHP is not interpolating the variable names in the email. Solutions?
>
> Thanks God, PHP does not treat all files it reads as PHP code! Just use
> str_replace() on $body to replace the values you want. I suggest, though,
> that you chose another markup that's not so prone to undesired
> replacements. Some ideas:
>
> {$foo}
> %FOO%
> [%foo%]
>
> ...
>
> --
> -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
> ++ Mi sitio sobre programación web: http://bits.demogracia.com
> +- Mi web de humor con rayos UVA: http://www.demogracia.com
> --
Why not just use .php instead of .html?
Navigation:
[Reply to this message]
|