Answer the question
In order to leave comments, you need to log in
How to edit the design of a site consisting of many PHP include pageX.php?
I develop desktop applications on .Net. There was a need to write a couple of pages under the Web. I figured out palatine with PHP and even wrote a couple of simple sites. I used the classic approach from textbooks, like:
<?php include 'header.php'; ?>
<?php include 'leftmenu.php'; ?>
<?php include 'body.php'; ?>
<?php include 'rightmenu.php'; ?>
<?php include 'footer.php'; ?>
Answer the question
In order to leave comments, you need to log in
firstly, it is desirable to move to the MVC pattern, otherwise it will not only be difficult to extend, but also change the design. MVC and OOP to help you
The most primitive, in your case is:
connecting these parts in the template itself:
main_template.php
...
<body>
<?php include 'header.php';
<?echo $content ?>
<?php include "footer"
</body>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question