Results 1 to 8 of 8

Thread: Moving from CSS to PHP?

  1. #1
    Join Date
    Mar 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Moving from CSS to PHP?

    I found Dynamic Drive extremely useful in creating my CSS site, in pirticular the colour codes were very useful, but how do move onto PHP. Ive tried a number of sites, even Wikipedia to try and understand PHP but I just cant come to terms with it. Is PHP better for certain sites?
    Last edited by djr33; 06-11-2007 at 04:13 AM. Reason: Illegal Signature

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    PHP is a server-side language which lets you interact with other web-pages.
    Basically it goes in a HTML file (but you have to use a .php extension) like so:
    Code:
    <?php
    //PHP CODE GOES HERE
    ?>
    When the file goes on the web, it is completely invisible to the user. Even if you download the php file, you get the results of that php script. So that's why php is good for processing passwords/usernames or any time of stored data.
    That's php in a nut-shell.

    PHP Functions/Manual/Reference: http://www.php.net/
    - Mike

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  4. #4
    Join Date
    Jun 2007
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt View Post
    PHP is a server-side language which lets you interact with other web-pages.
    Basically it goes in a HTML file (but you have to use a .php extension)......
    unless you configure the web server, or (more likely) use .htaccess to parse php to parse in html. Very handy if you want to use - say -php includes, but don't want to change the file extension.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Possible, but not usually a good idea. This will then overwork your php parser, for every single html page on the site.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Jun 2007
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    Possible, but not usually a good idea. This will then overwork your php parser, for every single html page on the site.
    I've not had any problems thus far on a 60+page site, where php includes are now used throughout. The pages load fast and clean. Have you experience where there has been a problem?

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    ::shrug::
    That's a fairly small site, I guess. With only that many pages, probably no big issue, then. With 1,000 pages accessed by thousands of users every hour, then that's a problem.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Jun 2007
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OK, thanks, I'll keep that in mind. The site is doing well - but for a niche manufacturer, so visitor numbers should never be excessive. I doubt if page numbers will exceed a hundred or so. I really don't want to reassign the php extension to all the htm pages - and 301 them. Would it be good practice to make all future pages (using php) on the site to be .php?

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
  •