PHP Include File Code GeneratorUsing a PHP file include tag can make managing your website content or navigation systems a lot easier. If you have content or navigation systems that are repetitively placed on pages, using PHP file include tags allows you to update 1 file and all pages are instantly updated with your changes. You can use the PHP include file code generator to quickly create your PHP include file code below: |
Before getting started, do a quick test to determine that you can actually use PHP includes on your server!
You are going to create 2 files for this test:
Create a new file and put the following text in it:
Save the file as test.php and upload the file to your server and place it in the same directory as the page you want to use it in.
Create a new file called 'show.php'. Within this file, directly after your <body> tag paste in the following:
Save the show.php file then upload it to your server. Open the show.php page in a browser and see if it includes the test.php file words 'This is a test!' in the page body area.
If your test does not show the test words, then your server does not support PHP.
If you are unable to use PHP include tags, then we recommend using the Server Side Include Code Generator instead.