Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are shortcuts to create new files in explorer (one that I use is Alt+F+W+T). But it just creates a new text file.

Being a developer, I wanted to know is there any such shortcut for creating a php file directly? (I currently rename the txt file to php)

share|improve this question
@ekaj Hadn't tried it again as I hadn't seen the edit. Will surely try this when I get time. Thanks btw :) – gopi1410 Jul 8 '12 at 11:18
And? Did this work? – cutrightjm Aug 1 '12 at 21:34

Like this:

  1. Navigate to the directory where you installed PHP,make a text document, and rename it untitled.php
  2. Open the registry editor using by using the start menu's search function and typing RegEdit
  3. Find the .php key in HKEY_CLASSES_ROOT, and create a subkey called ShellNew
  4. In ShellNew, create a new String Value with the name ItemName, and the data should be to your untitled PHP file (Mine is @%SystemRoot%\Programs\PHPApache\untitled.php,-470, for example (I'm not sure what the ,-470 means, but I put it there because .txt files had it as well)). Just redirect this to the correct path for your installation.
  5. Then make a new Expandable String Value and name it NullFile
  6. Go to your desktop, right click, and it should show an option for a new PHP file.

This should be correct, but I had some difficulties following the guide I had originally posted, sorry, and once I got it to work correctly I couldn't remember the exact steps. This should work correctly, however, if not tell me so. To get this list of steps I looked at the values for a .txt document, since you are also able to make a new text document by right clicking.

share|improve this answer
It says the key phpfile already exists (in step3), so gives an error.. – gopi1410 Jun 17 '12 at 7:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .