1

I am going to create a HTML generator based on PHP, this generator will help me to create some HTML file. The HTML file's content is based on the data input by user. Is there any PHP class or PHP framework I can used to develop this tools in a easy way?

Imran Naqvi
  • 2,202
  • 5
  • 26
  • 53
Charles Yeung
  • 38,347
  • 30
  • 90
  • 130

2 Answers2

4

PHP is also known as "Hypertext Preprocessor", so all you need is PHP itself in order to "generate" html files. PHP can interpret data inputs and give wanted outputs as an html file. Actually it's the only way that PHP works.

Onur Senture
  • 519
  • 5
  • 16
  • Please see my comments above, I want to create .html file, likes Excel create .xls file, it help me to do the routine works automatically instead of using Dreamweaver to make the table and creating .html file manually. – Charles Yeung Jun 10 '11 at 08:15
1

most PHP frameworks have (or implement the ability from extensions) the functionality you need. e.g. Cakephp has the so-called helper classes, some of which are used to generate html content.

example (cakePHP):

echo $this->Form->input($params);

this generates input controls based on parameters passed to it.

Reference

Headshota
  • 21,021
  • 11
  • 61
  • 82
  • Thanks for the suggestion, but how could I create the form by CakePHP to receive user's data and pass to the HTML file. More reference would be appreciated – Charles Yeung Jun 10 '11 at 08:17
  • Here I posted in the answer, the reference from Cakephp cookbook. you can veiw examples of functionality. – Headshota Jun 10 '11 at 08:27