The other day I was editing a simple PHP file in notepad for one of my blogs. So I saved the file as example.php. As I went to save it, it automatically converted the save format like this:
example.php.txt
At first I didn’t notice this, and when I uploaded the file to my server, the page wasn’t displaying properly. So I went back to check, and sure enough the file I uploaded to the server had the .txt extension. This is sometimes frustrating, because notepad does this automatically in most cases when you save something, and it isn’t immediately visible.
So I just wanted to share a quick way to ensure it saves your files in the format you wish to save them: Use quotations. This is really quick and easy to do. Whenever you go to save the file, just enter the name in double quotations. Then click save, and it should save it in the format you chose. So for example, you would enter this:
“example.php”
Another way 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).
This should do the trick and allow you to save your notepad in the appropriate format. Best of luck to you!