I am new to PHP. How can I create a base (like an asp.net masterpage) and have all other pages inherit from the base page or designate that I want pages to inherit from a certain base page, so I don’t have to recreate things like headers, navigation, footers, etc…
Is it just more or do ASP.NET Masterpages seem to slow things down and add unnecessary clutter?
There is no such thing in php; however, there are 2 functions you can use to simulate that.
include()andrequire().Like this
top.php
Other.php
random text
The two constructs are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error.