SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: php and html

  1. #1
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php and html

    I finally found my index and associated files and they are php files. One of them needs to be updated frequently and it is a word document saved as an htm or html file. So my question is can I just replace the php file with the htm file and have the subsequent changes show up in the existing web page or do I have to find some way to save the word file as a php?
    Thanks,
    John

  2. #2
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can have it as a .php extention with just html and it will work

  3. #3
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks JREAM,
    The problem is I work the page in Word and cannot save it with a php extension. Or do you mean I can save it as htm extension and use it in place of php?

  4. #4
    SitePoint Addict Smola's Avatar
    Join Date
    Mar 2005
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need the extension changed you should be able to do it manually in your operating system. If you have Windows just make sure you can view file extensions and manually rename it to .php
    Humbly,

    Smola

  5. #5
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Smola,
    Very new to all this, but is fun time.
    John

  6. #6
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh im not very good with Word, but i know you can save the file in html and just hit F2 to rename it and change .html to .php and you should be cool. sorry i wasnt too clear on it

  7. #7
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Do you mean "how can I make a html file be served up by default as the index page in a particular folder?"

    If so this can be done by altering a setting in your server.

    If you are on IIS I'd be surprised if it didn't just worked on its own.

    You should try saving is as index.html (or index.htm or default.htm on windows) stick it in the folder with no index.php file and see what happens.

    IIRC its called variously "default document", and usually there is a pecking order of file names that the server will try and get and serve up as the "main index page".

    Unless I have barked up the wrong tree (again) here, renaming a .html file to make it go through the .php parser seems a bit of a kludge.

  8. #8
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the help guys.
    And JREAM you have a few VERY challenging chord shapes on your site! You must be into jazz or blues. My fingers don't work that well. lol
    John


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •