Can I Put Php Into My Index.html Page In A Shared Hosting Environment On Godaddy?
RSS

Can I Put Php Into My Index.html Page In A Shared Hosting Environment On Godaddy?

Category: FAQ   Time: 2009-07-25   Tags: , , , , , ,

I’m hoping there’s a file I can stick into my file system that will tell the shared hosting that in my directory .html documents can run PHP scripts. Right now I have to rename them index.php and that’s going to really be a problem on my site. Does anyone know a way to change that setting?

Next: How Do I Link My Domain Name With My Actual Website?
Previous: Bought A Site On Godaddy.com, Now I Need To Know How To Design It. Help Please?!?
"Can I Put Php Into My Index.html Page In A Shared Hosting Environment On Godaddy?" was posted on Saturday, July 25th, 2009 at 9:29 pm.

4 Responses to “Can I Put Php Into My Index.html Page In A Shared Hosting Environment On Godaddy?”
  1. tony cool(2009-07-26):

    yah you can try doing it in a .htacess file , you would prob have to put it in every folder that you want this to work
    add this to an existing .htacess file or make up a text file, name it .htaccess, add the following:
    DirectoryIndex index.html
    AddType application/x-httpd-php3 .php
    you may need this too………..

    options execcgi
    SetHandler cgi-script

    hope this helps

  2. wgadkins(2009-07-26):

    Assuming your server supports it, you can use a server side include to call a php script. An example where we’ve done this may be seen at projectenlightenment.wcpss.net/index.htm… It dynamcially renders Upcoming Events in the .html page.
    If you don’t want to rename your pages and only have a few pages requiring dynamic content, this approach may work for you. Otherwise, you will most likely need to go the .htaccess route.

  3. Mac-C(2009-07-26):

    Howzit
    PHP only runs in file.php only. If you want to use PHP coding the extension should be (file.php). Alternatively you can use JavaScript. I am not a big fan of JavaScript… it’s pretty much dead technology. If like me you are not, then the only choice you have is to rename the files to have a .php extension
    [apologies to the JavaScript fans... i just can't hold my tongue. Have to tell it like it is]
    Good luck

  4. wwwben(2009-07-26):

    you will have to update your .HTACCESS document or make one that is appropriate http://www.javascriptkit.com/howto/htacc…

Leave a Reply

 
Recent Posts
Random Posts