A big PHP file-type related confusion!!

Discussion in 'PHP' started by tayiper, Oct 14, 2007.

  1. #1
    Hey all, I am creating this thread basically because of my "argument" with user Mike H. in the recent A contact form that doesn't use an e-mail client thread (which I don't want to "float" anymore further) that I opened here on DP forums; in particular see my and his posts from the 15th post onwards.


    Anyway, I just want you to confirm or disavow what I said/wrote in there, quoting (it's a bit modified text though):

    You see, as I see things, Mike H. simply assumed that I am not computing-knowledgeable and that I am not creating "*.php" files, but "*.txt.php" ones instead. While of course I haven't, I mean I don't even use Explorer as my file-manager (nor as OS's default shell), so there is no "hidding of known file-types" on my PC.


    My question is then: I am right that a PHP file is basically a file in "text format", and that you create a PHP file simply by writing the PHP code (which is in plain text as far as I know) into a common .txt file (or for that matter already into a file with.php extension), and then change the respective file's extension from .txt to .php??!


    P.S. - And once again regarding file-types: as far as I know they basically only associate an extension with certain file-type, so that the OS knows with/in which program to open a certain file when one double-clicks on it. While file-type in terms of file-format (i.e. for instance .exes being in binary, .txt, .html etc. being in plain text, .docs being in MS-Word format etc.) is something completely different!!


    tayiper
     
    tayiper, Oct 14, 2007 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    I have to agree that what I have read here in this thread appears right on target.

    I have php code that runs from files with .php, .html, .htm and files with no extensions at all.

    PHP is a scripting language. Code in text and feed it to a parser.

    But hell, what do I know!? :p
     
    noppid, Oct 14, 2007 IP
  3. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #3
    OK, thanks much for your quick reply; now I could finally sleep well - :) ...


    tayiper
     
    tayiper, Oct 14, 2007 IP
  4. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #4
    I kinda looked at the other thread. For testing, I don't trust local host home machine stuff for php.
     
    noppid, Oct 14, 2007 IP