Reputation: 298
I am developing a PHP site. It is simpler for me to check syntax through PHP -l
than to test in browser and hope for a descriptive error. I made myself a btach file that I drop the php file onto it to check it's syntax before uploading. (Mainly for missing ';'s.)
Now, I wanted to take this a step further and just add this option as a context menu choice on php files. I added the following to the registry:
[HKEY_CLASSES_ROOT\php_auto_file\shell\&check syntax]
[HKEY_CLASSES_ROOT\php_auto_file\shell\&check syntax\command] @="PHP -l %1 && pause"
For some reaon, this does not show up on my context menu, even after restarting. I've done context menu additions in the past and don't recall such an issue. Any clue?
Upvotes: 1
Views: 571
Reputation: 298
Got it. The answer is that although I found an entry for .php in the registry, it wasn't really registered as a file type. Therefore, Windows didn't bother to check up the entries for this file type.
The solution was to right-click the file, Properties, change default program, and Bingo the custom context-menu item showed up.
Upvotes: 1