PHP Includes
Home → Tutorials → PHP Includes
PHP includes are an easy and simple way to display one webpage on any other webpage, especially navigation/sidebars, without using Iframes.
Simply place this code where you'd like the webpage content to be displayed:
<? $a = file_get_contents("FILENAMEHERE.php"); echo ($a); ?>
Just remember:
- Use the file name (/home/www/yourwebsite.com/index.php) not the URL (http://yourwebsite.com).
- Your file must be a .php file.
- Your host must provide PHP hosting in order for this to work.
- Editing made to that one webpage will appear on all the other webpages that code is on!
Enjoy! If you have any questions reguarding this tutorial, feel free to contact me here.
