Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    .html can be replaced by .php and work exactly the same right? or do you should i use .html.php?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    When a file has the extension of .php, the server takes that file
    and parses it in a special place on the server ... a place where it
    executes any PHP scripting BEFORE it sends the file to the user's
    browser.

    So when the user gets the page, it appears as any typical HTML
    file, it's just that any PHP scripting has been executed first, so they
    don't see any of the scripting that was in the original file.

    Here's an example you can try:

    Upload this and call it: test.php
    PHP Code:
    <html>
    <head><title>My PHP Test</title>
    </head>
    <body>
    This is a test of using PHP within my normal HTML stuff.<br>
    The year is:  <?=date("Y")?>  (using inline PHP scripting)...
    <br><br>
    Or, the year is:
    <?php
    echo date("Y");
    ?>
    (using standard PHP scripting)
    <br><br>
    </body>
    </html>
    Once you view that page on your browser by going to the URL,
    view the HTML and see that the PHP scripting has been processed
    and is not visible.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:59 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com