Windows – Why does Windows append .php to the php files but not other ones

file extensionPHPwindows

I have many different types of files in a folder – .php, .css, .htm, .js, .docx, .xls, etc.

The only file type that Windows (viewed from Windows Explorer) actually shows the extension are the .php files.

Why is this?

Best Answer

Two things are most likely on your system for this to happen:

  1. The option Hide extensions for known file types is checked.

  2. You haven't registered the PHP filetype to your system and thus is an unrecognised file format.

These combined will show .php file extensions while other documents are hidden.

You can change this when you open a folder and go to: Tools > Options > View

There you'll see the option to uncheck Hide extensions for known file types. Do so and save.

If you want to hide the PHP file extensions, leave the extensions option hidden and just register the filetype.

Related Question