Virtually anyone has encountered some problems with opening unknown files while working on a computer. It can be very frustrating. Yet such problems, not only with PHP files, can be addressed in a standard way. Follow the steps below and we can guarantee that your problem with opening PHP will be resolved!
The PHP Source Code File format (file extension .php) is a server-side scripting language used to create and manage dynamic websites. It contains the code necessary for a website to function as designed, including data structures, functions, classes and other objects.
In order to view the contents of a PHP file effectively, it must be executed by a server-side scripting language interpreter like PHP or CGI. When executed, the server will interpret the source code and generate an HTML document that can be viewed through a web browser.
If given user account does not have necessary permissions to open files with PHP extension, it is highly probable that no program that supports given files is installed on the users’ system. Below is a list of actions user should pursue in order to resolve most common problems.
After the application has been installed, the system should automatically open PHP files with given application. Below is the list of relevant programs along with operating systems they are available for:
It is possible that an application that supports PHP files is not associated with such files. In such case, the program should by manually associated with PHP files (right-click on the file icon → Properties → General Tab → In submenu "Open with" and click on "Change" button. System will display a list of suggested programs that support PHP files. Choose the application by checking the box "Always use the selected application to open this kind of files". System will store this information in its registry and use it to open PHP files with the selected program.
File association for PHP files can be edited manually by editing appropriate entry in Windows System Registry. However, it is discouraged as it may introduce errors to registry if not done properly and may even damage the system.