Depends entirely on you and your needs. What should your engine contain? Why do you even need to make your own? Learning purposes?
You should divide your application in different layers. Some MVC-inspired architecture is usually a good approach.
One of the important rules in writing good code is separation, and presentation logic and application logic should always be separated, below is a simple but yet flexible way to approach:
app/
config.php
bootstrap.php
modules/
home/
home.php
login/
login.php
templates/
home.html
index.html
login.html
index.php
config.php - would contain configuration such as database details, base url, smtp for email, etc.
bootstrap.php - would be responsible for bootstrapping the application, setting up error handling, database, some container to pass dependencies to modules, autoloading, etc.
modules/ - would contain modules, modules would contain the application logic and busniess logic (a simple, but less separation of concerned application structure) here you would have database queries and loading templates depending on a user's request (etc, show a login form). a module would typically contain a game feature for simplicity, example you could have a module being responsible for logging in a user (setting a session).
templates - contains presentation logic, html... You would pass data from your modules to the templates that can be displayed, etc if a user is logged in you would show a logged in template if not a login template, if you would list members of your "game", you could have a moudle "memberlist", that would pass an array of members to a memberlist.html template that would foreach the array and showing them in some nice table...