i'm a beginner in php but want to expand my knowledge. so i want to create a cms from scratch.
i already have an idea how to create a post. by inserting data to database
and populate the html file with the data(post) that came from the database
example this is my website
domainname.com/index.php --- and this is the address of my homepage
on my homepage, i want to show some preview of my each post.
and if the user of the website click the post. it will go to another page
domainname.com/postname.php
and with the data like this
so my question is how do the CMS create the file for every post. the idea in my mind is creating the html file dynamically using php and naming the file with the name of the post. but is it a good practice? or am i doing it right?