1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can't Create PHP File in Notepad

Discussion in 'Co-op Advertising Network' started by graybeard77, Mar 16, 2005.

  1. #1
    I've got a problem I haven't been able to find an answer to. I'm trying to create the ad_network_197.php file in notepad with Windows98 OS. When I go to save the file, I type the .php extension but it ends up .php.txt. I tried it in MS Word and similar thing happened, ie, php.htm or php.doc.

    I've read some tutorials and they said you create a php file just like you would an html file. I must be doing something wrong but I don't know what it is at this point.

    Any help?
     
    graybeard77, Mar 16, 2005 IP
  2. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #2
    Save as type: All Files
     
    fryman, Mar 16, 2005 IP
  3. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Or you could put quotes before saving the file name.

    eg,

    "file.php"
     
    Tuning, Mar 17, 2005 IP
  4. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I would get yourself a good, free text editor like TextPad and stop using Notepad. Notepad is notorious for introducing junk characters into your files and unix/linux systems don't like that.
     
    chachi, Mar 17, 2005 IP
  5. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #5
    What he said. Syntax highlighting will make you doc easier to read too if ya get and editor that highlights.
     
    noppid, Mar 17, 2005 IP
  6. graybeard77

    graybeard77 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the help.
    I had already tried Save As type: All Files. That didn't work.
    Problem turned out to be php was not a defined file type on my system.
    Once I went into My Computer, View, Folder Options, File Types and defined php, I was able to save the files with a php extension.
    Thanks for the responses.
     
    graybeard77, Mar 17, 2005 IP
  7. neha22

    neha22 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    How do you define a PHP type on Windows if it doesn't already exist? What do you do with the "Open With" ?

    Reply would be much appreciated!
     
    neha22, Mar 30, 2008 IP
  8. Yankee85

    Yankee85 Peon

    Messages:
    1,067
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You open thw file with "Open With..." option. Then click on Notepad from that list, check the checkbox ("always use this program...") and then click ok.
     
    Yankee85, May 8, 2008 IP
  9. Trader140

    Trader140 Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Put it in "quotations" it will work fine.
     
    Trader140, May 26, 2009 IP
  10. kunnusingh

    kunnusingh Well-Known Member

    Messages:
    649
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #10
    Your Problem Solved:

    Solution: go to My Computer >> Click on Tools(on top) >> Folder Option >> Click on "View" tab >> and remove tick mark from "Hide extensions for known file types"

    and you can edit your extension directly. your all file show like a, example.txt(example.extension)


    rename to example.php

    when you use Notepad then click on Save as and rename to Yourfilename.php
     
    kunnusingh, Sep 4, 2009 IP
  11. Clickbank Pirate

    Clickbank Pirate Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    1. Download WinRar or from --- Rarlab.com/download.htm --- get the free trial version
    2. On Desktop w/mouse, right click >> New >> Winrar Zip Archieve
    3. Open the unamed Zip file
    4. drag and drop your .txt into the Zip folder
    5. replace the .txt with .php!
    6. Drop .php file back to desktop
     
    Clickbank Pirate, Sep 7, 2009 IP
  12. SubZtep

    SubZtep Member

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #12
    Type this:

    [WIN]+[R]
    cmd [ENTER]
    cd c:\yourdirectory[ENTER]
    rename yourfile.php.txt yourfile.php[ENTER]
    exit[ENTER]

    Have fun! :)
     
    SubZtep, Sep 8, 2009 IP
  13. davocool

    davocool Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Make a .htaccess file and put the following


    Good luck
     
    davocool, Sep 8, 2009 IP
  14. elladrone

    elladrone Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    have to show all extensions for that to work in Save As or Rename.
    use .htaccess server-side to parse .php correctly.
     
    elladrone, Dec 28, 2009 IP
  15. clades

    clades Peon

    Messages:
    579
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #15
    You should add the folder option "Show extensions for known types" so it doesn't confuse you...
    That way if you make a mistake while saving you can always rename the extension...
     
    clades, Jan 11, 2010 IP
  16. Alexandros1

    Alexandros1 Peon

    Messages:
    332
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    To do this without quotes is to select the [all file formats] options before you click save. If you do that, it should recognize the PHP file format and save it without adding the extra .txt extension at the end (no quotations needed).
     
    Alexandros1, Jul 9, 2010 IP
  17. newcity

    newcity Peon

    Messages:
    1,015
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Upload your file whatever.php.txt to the web server, and rename it there from ftp software or your Cpanel. :) I hope it helps.
     
    newcity, Jul 9, 2010 IP
  18. Alexandros1

    Alexandros1 Peon

    Messages:
    332
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    You should be able to see your file as its true name, be it "blahblahblah.php.txt" or "blahblahblah.html.txt" or whatever. Now click once on the filename. Explorer will now allow you to change the filename. If this is not true, select the filename and hit the F2 key on the keyboard. Delete the ".txt" extension, leaving the filename as "blahblahblah.php" (without the quotes) or "blahblahblah.html". Make sure there are no trailing dots or spaces - that is, make sure the filename is really "blahblahblah.php" and not "blahblahblah.php." with a trailing dot or the like.
     
    Alexandros1, Jul 15, 2010 IP
  19. Neel Networks

    Neel Networks Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    i would use a open source free txt editor which all great features notepad++
     
    Neel Networks, Jul 25, 2010 IP
  20. ahsankhan

    ahsankhan Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    good answer i would recommend it
     
    ahsankhan, Nov 26, 2010 IP