How can I save a .php file using Notepad?

rishi November 27, 2011

I try to save HTML/PHP files with the .php extension, but when I open the files it shows me filename.php.txt. How can I make notepad save these files as .php?

  1. Jeff Fabish
    November 28, 2011 at 6:02 am

    Hi Rishi,

    You have two options. Either rename the file and remove the .txt or save the file directly as .php. To save the file as PHP (and only php), in the Save File Dialog in "Save As Type" select "All files" and name it "whatever.php". 

    - Jeff

  2. Jay
    November 28, 2011 at 5:29 am

    1.using quotes in filename from notepad while saving it as php might help.
    2. go to the folder where the file is stored.
    and rename the file as php (remome.txt so it will be file name.php)
    unhide file extensions from folder options, if it is causing any problem.

    • Jay
      November 28, 2011 at 6:50 am

      see how double quotes worked in the image when i tested it.

      see red areas.
      u.php.txt is how you did it.

      put it in quotes and save it.
      (the file is on desktop before being save is because captured the screenshot after i saved the file, just to show.)