Reputation: 363
I'm doing an online challenge where I have to log on to a server with a username and password. I inspected element and found a comment in the HTML code saying that the details are in 'page.phps' in case he forgets the details. So I was wondering: what's the difference between .php
and .phps
?
Upvotes: 26
Views: 19060
Reputation: 468
The PHPS file type is primarily associated with 'PHP Source' by The PHP Group. Generally, PHP files will get interpreted by the Web server and PHP executable, and you will never see the code behind the PHP file. If you make the file extension .PHPS, a properly-configured server will output a color-formated version of the source instead of the HTML that would normally be generated.
Not all servers are so configured.
Upvotes: 21
Reputation: 456
If you use .php as your extension to a file, the server will then interpret the code behind that script and returns the desired output.
While .phps will just output literally a color-formatted content of that script as shown below.
Upvotes: 30