How do you create .html or .php files with C++

Example:

Enter title for your website: My Website
Program puts that string into <h2> </h2> tag, then creates an HTML file.
The only thing as of right now that I don't know how to do is,
how to create .html extension files.
Use fstreams:
1
2
std::ofstream out("website.html");
out<<"<html> <head> <title> C++ Rocks </title> </head> </html>";


http://www.cplusplus.com/reference/iostream/ofstream/
Topic archived. No new replies allowed.