How to generate a HTML page dynamically using PHP?

前端 未结 8 1373
我在风中等你
我在风中等你 2020-12-23 11:01

I have a page which displays info about a property, based on the unique ID from the url, searching the mysql database for that ID, getting all the info from that row etc, fa

8条回答
  •  隐瞒了意图╮
    2020-12-23 11:20

    Just in case someone wants to generate/create actual HTML file...

    $myFile = "filename.html"; // or .php   
    $fh = fopen($myFile, 'w'); // or die("error");  
    $stringData = "your html code php code goes here";   
    fwrite($fh, $stringData);
    fclose($fh);
    

    Enjoy!

提交回复
热议问题