css - Changing content of php page -


I wanted to know if there is something like a content holder in PHP ... as we use in asp Are there. I have my index.php and I want only one part if the page is updated, then I am using CSS. I was thinking about making a copy of index.php, for example, where to register.php again to change the CSS tags, how is it done? There are parts that are fixed in index.php. For example: list categories, sub categories I now want to apply a registration section. The list of categories should still be and should change the part of index.php.

ASP Object outside the net box is oriented, while PHP is not. As such, there is no native "placeholder" for PHP if you want this kind of functionality, you should use the MVC framework such as Or, you can create your own plain template.

For example, here's a simple page:

  & lt; Php include ("header.php"); Included ("navigation.php"); ? & Gt; & Lt; H1 & gt; About us & lt; / H1> & Lt; P & gt; This is our page about us. & Lt; / P & gt; & Lt ;? Php included ("footer.php"); ? & Gt;  

In this example, you have parts of your page that are relatively stable (header, navigation, footer, etc.) that are stored as pieces included in your primary files Such as Index.php, aboutus.php, and gallery.php. In the above example, we see how a simple "About Us" page can look like.

This model is relatively popular among young programmers, but if you are familiar with the object-oriented framework, instead you encourage Kohana to see and familiarize yourself with the model-view-controller method of development. To work.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -