Your Ad Here Your Ad Here
Results 1 to 9 of 9

Thread: Html Vs Php

  1. #1
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    35
    Posts
    4,541
    what is diffrent between them, which is better.
    ma site is html should i convert to PHP? :helpsmile:


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  2. Internet, Programming and Graphics   -   #2
    vivitron 15's Avatar Poster
    Join Date
    Jan 2003
    Location
    North East England, UK
    Posts
    1,772
    they are basically one and the same - php is just "dynamic html" take this eg:

    you have a photo gallery on your page
    html - when you add a photo, you upload the picture, edit the html such that the picture is included and hyperlinked to
    php - you make a script which goes through a certain directory, lists all the files and then displays all the images with all links etc. automatically.

    you have a menu bar on 10 of your pages which allows people to navigate the site.
    html - when you add a page, you must edit each html page seperately, adding the new page
    php - you put the code for the menu in a seperate file "menucode.inc.php" then in each page, you add the code "<? include("menucode.inc.php"); ?> When you want to add a page, all you need do is to change that 1 file, and all are updated.



    php doesnt take long to learn enough to get your page easier to maintain, and if your host allows it, then id say go ahead - for a start, just rename all the files from index.html to index.php and itll work just the same.

    Oh, and when you start getting errors after having used some php code, check you included a ";" at the end of each line and that you closed all the brackets
    <insert signature here>

  3. Internet, Programming and Graphics   -   #3
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    35
    Posts
    4,541
    Thanks, that help me lot


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  4. Internet, Programming and Graphics   -   #4
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    35
    Posts
    4,541
    the hardest part is that i must relink all pages


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  5. Internet, Programming and Graphics   -   #5
    TRshady
    Guest
    In that case I suggest you get dreamweaver bawa mate. You can change source code in all your pages in the entire current local site. Meaning you could just type in to change .html to .php, and its all done for you. Plus all the other benefits you get with dreamweaver .......

  6. Internet, Programming and Graphics   -   #6
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    35
    Posts
    4,541
    i have dreamweaver but the "source" thing, i didnt understand can u tell step to do that.
    i took me 1 Hr to change all html&#39;s to php


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  7. Internet, Programming and Graphics   -   #7
    TRshady
    Guest
    lol, poor sod .. dont have dreamweaver on this comp .. so I&#39;ll do ma best to tell you from memory.

    1. First make sure the results panel is open, if not then window>results
    2. Click on the search tab and when the box open, change &#39;current document&#39; to &#39;entire current local site&#39;
    (I assume you have set up a site for use with this project?)

    3. Now change text to source code
    (this will make dreamweaver search and edit the source, not the actual text on pages so wont modify your content).

    4. Now theres to boxes, one for what to look for, and what to change it too ...
    Now although you want to change index.html to index.php, using filenames here will mean you will need to do them all. I know you&#39;ve done this already, but now you know what to do next time eh?

    5. In the first box type: .html ... in the second type .php
    (so this will search through the coding of all your pages, and change every instance of .html to .php which is what you want). Oh, but be careful as if you have used the text .html on any of your pages, this will be changed to .html.

  8. Internet, Programming and Graphics   -   #8
    vivitron 15's Avatar Poster
    Join Date
    Jan 2003
    Location
    North East England, UK
    Posts
    1,772
    i do believe when you rename pages using the "site managment" bit (where you upload files from) it will ask "update links to this page in the current site?" click Yes, and itll do it for ya i think


    but thats for anyone else trying to do it - too late to help you
    <insert signature here>

  9. Internet, Programming and Graphics   -   #9
    PHP is a server side scripting language & HTML is on client side. Only use php if you are using to run scripts that would be suitable at client side or using a database to explode the content to your pages created dynamically.

    Btw, vivitron those examples you gave can all be done without php. Regarding menu bar, one can use .shtml and include it on all the pages as a header or footer. &#60;&#33;--#include virtual="LOCATION_OF_FILE"--&#62;

    I would recommend using PHP only if you are doing any server side scripting.

    <offtopic>
    Its hilarious the other day I saw someone using php and it was a disgrace to php. That guy named all his pages as page.php and inside he was including header, footer, and sidebar pages which were all in html. Everything is html but he used php just to impress people and including html pages which could have been achieved by several other methods. I guess I am gonna rip him apart pretty soon in a presentation </offtopic>

    -
    I.am
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

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
  •