Results 1 to 9 of 9

Thread: HTML files saved with a PHP extention

  1. #1
    Join Date
    Feb 2009
    Posts
    7

    Default HTML files saved with a PHP extention

    Would one be considered to be an idiot, or possibly even insane, if he/she has files that have no PHP coding in them whatsoever, and contunued to save and upload them as .php extentions, anyway?

    __________________
    Wholesale USB Flash Drives online photography classes

  2. #2
    Join Date
    Feb 2009
    Posts
    1

    Default

    Not necessarily. The file will function just the same with a PHP extension as it would with a regular HTML extension. One thing I like about automatically creating all files with PHP extensions is that if later you want to add something in PHP to the file, you don't have to save the file again with the new extension or worry about changing any Apache settings.

  3. #3
    Join Date
    Apr 2009
    Posts
    5

    Smile Welcome

    in saved as dialog box change the extension of the file

  4. #4
    Join Date
    Jun 2009
    Location
    UK
    Posts
    16

    Default

    well one should not make it practice if there is no php code but if someone do it by mistake even then there is no harm

  5. #5
    Join Date
    Aug 2009
    Posts
    6

    Default

    Quote Originally Posted by belablasko View Post
    well one should not make it practice if there is no php code but if someone do it by mistake even then there is no harm
    If there's no harm in it, isn't it better to save it as .php sometimes, like sasakakee said?

  6. #6
    Join Date
    Sep 2003
    Posts
    3,040

    Default count in forloop

    One simple optimization that most people miss is not using count($var) as a condition of for loops.


    PHP Code:
    // Wrong
    for ($i 0$i count($Results); $i++)
    {
    // Do Something


    PHP Code:
    // Correct
    $ResultCount count($Results);
    for (
    $i 0$i $ResultCount$i++)
    {
    // Do Something

    It’s very simple, and now you’re not counting the size of the stack every time you process the loop.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  7. #7
    Join Date
    Sep 2009
    Posts
    4

    Default

    I dont think so...It depents how it comfortable for you

  8. #8
    Join Date
    Oct 2009
    Posts
    4

    Default

    i dont knoww

  9. #9
    Join Date
    Oct 2009
    Posts
    3

    Default

    Looking out what that ball out

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
  •