Greenhorn Greenhorn - 6 months ago 47
PHP Question

Converting a .php file to a .html file?

I have a .php file which has several queries in it. I want the output file as a .html file...

Is there any way to do this. I am currently doing this by saving, using my browser, that executed PHP file, as an .html file. But when I launch my product that should not be the case of the client.

Please suggest a way, thanks in advance...


Here is a sample code:



// your PHP / HTML code here

file_put_contents('where/to/save/generated.html', ob_get_clean());