One of the frequent complaints I receive from readers is, "I can not get the PHP include function to work on my GoDaddy hosted web site and their support department not help. "Realistically, obtain technical support department of" support "of their web hosting company at some point may leave much to be desired.
To be fair, most of the major hosting companies can ask and answer questions more quickly and accurately. However, there are times when it comes to issues techniques such as "the PHP", well that's another issue altogether. Although they say it works very well in its Linux platform, which does not seem known, or at least the person contacted, how or why it works. But I digress, so I'll stick with it before taking the rest of your hair.
The first thing you need to do is remove this line from the page to use
Delete this information from your page:? Xml version = "1.0" encoding = "iso-8859-1"? or returns an error of analysis and the PHP include function will not work.
Not all web pages contain this statement for your website may not have this line. Yipeee! Now, go ahead.
Next, you need create a folder and name it phpinclude. Do not argue, do it. This is where you store all the files you want included in your website. The files stored in the folder of phpinclude must have a. Php. This means that the files should end with. php instead of. html o. txt and so on.
And now, the magic bullet
Now you need to create a. Htaccess. Open Notepad and paste this Directive on page
AddHandler x-httpd-php. Html. Htm. CGI. Php
Save the file as. htaccess file and close Notepad. The file should look exactly like this. htaccess
Folder Up phpinclude and the. Htaccess in the root directory of your website. Make sure both files are in the same directory. You should now be good to go!
Happy phpeeing.
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
Dreamweaver
commerce, ftp, Godaddy, Hosting, website