Skip to: Site menu | Main content


Remember me?

Text Search PHP files

written by Mark Rowlinson - Last updated Mar 2006


When trying to debug somebody else's application it can be difficult to determine which file to look in to find the function that has been called when the application is large and contains many includes. This problem is worsened by the fact that as windows doesn't recognise PHP files it will ignore them when you search for files with a specified word or phrase in them.

Debugging aside this is an annoying feature. The steps in this article will address this.

Health Warning

I should add a health warning here that this has only been tested on Windows XP Pro so please use with care in other versions of windows. It would be good practice to take a back up of the registry before adding the keys.

How to Make the Change

Getting windows to search PHP files is a simple matter of adding a few regstry keys.

Step 1

Create a new text file

Step 2

Add the following text to it:

Windows Registry Editor Version 5.00



This adds 2 regsistry keys relating to 2 different search methods. Both of the GUID's relate to Filters that apply for text files.

Step 3

Rename the file to have the extension .reg

Step 4

Backup the registry unless you are very trusting!

Step 5

Double click the file and hit Yes when asked if you would like to merge the data into the registry.

Step 6

Reboot the PC.

PHP files will now be searched by the windows text search!

Other files

The approach can be easily modified to specify any other filetype you believe windows is ignoring by changing the .php in the text to the extenson of the files you wish windows to start searching.

Hope this saves you some time!