You are here: Re: [PHP] create HTML page on the fly « PHP « IT news, forums, messages
Re: [PHP] create HTML page on the fly

Posted by Angelo Zanetti on 10/26/05 18:26

Hi Miles.

Well the system that I wrote generates HTML newsletters using templates
etc... and before the newsletter is sent out it has to go to moderators
for approval.So a moderator will have a link in his email received and
it will point to the newsletter in HTML format, also it is needed so
that people who cant read HTML emails get a link to the newsletter and
can go to that page to see it. Does it make sense??

thanks for your input, much appreciated.



Angelo Zanetti
Z Logic
www.zlogic.co.za
[c] +27 72 441 3355
[t] +27 21 469 1052


Miles Thompson wrote:
> At 10:26 PM 10/25/2005, Angelo Zanetti wrote:
>
>> Hi guys.
>>
>> I've created a small newsletter application and the content of the
>> newsletter is stored in a DB (the HTML).
>>
>> However once the newsletter is complete and the user clicks a button I
>> want the newsletter/html file to be created on the server. How do I
>> go about this?
>>
>> I assume that I will use fwrite() to add the HTML to the file, I need
>> to know how to actually create the file before adding the content to it.
>>
>> thanks in advance.
>> Angelo
>
>
> Angelo,
>
> Does the content in the db contain HTML tags? If so you may need use
> addslashes(), stripslashes(), htmlentities() and the like as you save
> and retrieve content.
>
> All you really have to do is generate any HTML to start the page, add
> your content, and then closing tags and echo() or print() the whole
> shooting match.
>
> You could do this with a function called CurrentIssue(). Within the
> function, as you build the HTML, concatenate it to the function's
> internal return variable.
>
> Then you could simply echo CurrentIssue ;
>
> Why do you have to generate an HTML file?
>
> Regards - MIles Thompson

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация