|
Posted by Jerry Stuckle on 08/05/06 02:52
dawnerd wrote:
> 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?
>
Because PHP will still not parse a file read with fread(), no matter
what the extension.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|