Remove this from your page: ?xml version="1.0" encoding=" iso-8859-1 "? or you will get a parsing error and the php include function will not work.
Not all web pages will contain this statement so your page may not have this line. Yipeee! Now move on.
Next, you need to create a folder and name it phpinclude. Don't argue, just do it. This is where you will store all the files that you want to include in your web site. The files stored in your phpinclude folder should have a .php extension. That means that the files should end with .php instead of .html or .txt and so on.
And now, the magic bullet
Now you need to create a .htaccess file. Open notepad and paste this directive into the page
AddHandler x-httpd-php .html .htm .cgi .php
save the file as .htaccess and close notepad. The file should look exactly like this .htaccess
Upload the phpinclude folder and the .htaccess file to the root directory of your web site. Make sure both files are in the same directory. You should now be good to go!
Happy phpeeing.
About the Author:
Daryl is the creator of the popular web site Web Essentials and other web based educational Internet sites. He is also the author of numerous authoritative articles on web design and development topics. To learn more about web development visit Web Essentials at http://www.pro-dezign.com