How To Use php Include On Your Godaddy Hosted Web Site



Author: Daryl Putnam

One of the frequent complaints that I get from readers is, "I can't get the php include function to work on my Godaddy hosted web site and their support department is no help". Let's face it, getting technical help from the "support department" of your web hosting company can sometime leave a whole lot to be desired.

To be fair, most of the leading hosting companies can and do answer most questions promptly and accurately. But, there are times, when it comes to technical questions, such as "the php function", well, thats another matter completely. Even though they claim that it works great on their Linux platform, they just don't seem to know, or at least the person you contacted, how or why it works. But, I digress, so I'll get on with it before you pull out the rest of your hair.

The first thing that you need to do is remove this line from the page you are going to use

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

"

Total Word Count: 414
Click here to View more Articles at: Invision-Graphics
Invision-Graphics Article Source:

Approved on Saturday, January 27 @ 10:06:40 EST by Shawn DesRochers
 
Options
 Return to the main page Return Home

 Print Page Print Version

 Send to a Friend Send To A Friend

 Discuss Article Discuss Article

 Related Articles Related Articles

 Search Articles Search Articles

 Stories Archive Stories Archive

 Subscribe Newsletter Subscribe Newsletter

 Syndicate Article Topic: PHP XML News Feed

 Contact US Contact US
Article Rating
Average Score: 5
Votes: 1

How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rated 5 Stars

Rate this article:
How To Use php Include On Your Godaddy Hosted Web Site

How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rating 5 Stars
How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rating 4 Stars
How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rating 3 Stars
How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rating 2 Stars
How To Use php Include On Your Godaddy Hosted Web Site – Aticle Rating 1 Star


Syndicate Article
 My Yahoo!
 Google
 NewsGator
 Stumbleupon
 PluckIT
 Rojo
 Bloglines
 My AOL
 Blogrolling
 ENewsblog
 NewsIsFree
 NetVibes
 del.icio.us
 Technorati
 Digg This
 FeedBurner
 FeedMailer
Sponsor Advertising
Free Article Directory
Submit articles to the Article Directory, search and find free website content and ezine content, and open an author submission management account for free.

Text Advertising Info Text Advertising Info
Support US

Make a donation!
If you enjoy our services, make a donation today!

Google Support Ads
Related Links
More about PHP
News by Admin


Advertise Here

Most read story about PHP:
How To Use php Include On Your Godaddy Hosted Web Site

Book Advertising
Get this Book Now
Buy this Book Now!
Click Here
Comment on Article:"How To Use php Include On Your Godaddy Hosted Web Site" Login | Create an Account | 0 comments
The following comments are owned by the individual who posted them. Invision-Graphics is not responsible for the content or the accuracy of the following statements.
No Comments Allowed for Anonymous, please Register
Related Categories
Technorati TagsTechnorati Tags


Click Here to Advertise
Affordable Hosting! http://www.invision-graphics.com/images/banners/468X60_VISIONHOSTING.gif
 Today: 5,340  Yesterday: 39,154  Total Hits: 41,508,868
Page Rendered in: 0.09s - Total Queries: 37 - MySQL DB: 18.6 mb's - Pages served in past 5 minutes: 192