you can Add the content of one php page into another php page before the server executes it.
SSI stands for Server Side Include and means that you can include a file as part of your document while still on the server before it is executed and before the data reaches the client. One reason for doing this is that often data such as a header, footer, or variables are repeated in many places on the site. Using SSI allows these to each be stored in only one place, and thus only updated in one place when changes are made.
Code Reusability: By the help of include and require, we can reuse HTML code or PHP script in many PHP scripts.
Syntax:The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. As the name suggests, it will be included just once.
require() and include() are identical in every way except how they handle failure. They both produce a Warning, but require() results in a Fatal Error. In other words, don?t hesitate to use require() if you want a missing file to halt processing of the page.
The require_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the require() statement, with the only difference being that if the code from a file has already been included, it will not be included again.
Trending Tutorials