how to create templates in PHP

  Kiến thức lập trình

I am trying to create an advanced CMS site in PHP.
I want to add a template so that I can use it later for creating a page.
Does anyone have any idea how it should be done?

I tried the following way:
I created a simple 404 error page with inline CKeditor code in PHP and put it in the template list.
so that if someone wants to create a 505 error page, they can select a 404 page, create a new page with the 505 title, and edit the 404 page according to them.
But simple HTML is editable; I am stuck when data comes from a database.
Is this the right way of doing it? 

LEAVE A COMMENT