php for 71 php for

A PHP page statement included no prior very useful for creating your Web pages. If you are very new to PHP, or even do not know anyone, the mention also use it to manage your website. Logically, there can be some of the HTML web page in different parts. There are some other parts are static and variable portions. These are the parts that are not static change from page to page, ie top of the page when you have your site name and flag, the menu is you to a page, copyright replacing parts, etc. on the site elements that differ from one page to another, it is ie the page title, description, keywords, content of your page, etc. When you create a new website is to write the HTML code for the variable parts Total and static on your page. Now, if you want a new link on the menu, or if a change to your site then you banner to edit any HTML file that you already created. It is almost impossible, if your site has more than fifty pages. The PHP include files on the ideal solution to this problem.

What PHP include statement on this page?

PHP include statement provides a content file for inclusion in the moment he receives the statement. The statement takes a single argument, the name of the file to take account. The form of the statement:

To include the menu.html file using the following command:

Will add text or HTML file, the contents of that file to the file directly to parents at the point in which the balance schooling. But if you're a PHP file with the file contains a statement was notably the first hour, then the constitution of the parent folder. If no error is generated and, together, will generate PHP error message.

Using PHP include files?

To use the instructions for you to keep record of static parts of your HTML in separate files, for example, to menu.html, footer.html, top.html For your comfort, keep a separate file in the directory listing. When creating the new web site wrote the HTML, as usual, but when you write the static part of HTML code that you have a PHP file to include the statement with the code. As such, the resulting file is smaller and therefore easier to maintain. The You can also change the static part of a modified single file.

Point to remember: You can use any instruction page to include HTML or PHP files, but the parents of the statement of account must be a PHP file. Among the latter when economies that use of the page. Php.

Among the advantages of PHP page

  1. Result Page below. Therefore, the web space less necessary.
  2. Since the codes are divided into several parts, as it is easier maintain.

Finally, PHP is free software. Therefore, without additional cost required for PHP.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay


?>