Jump to content
  • Advertisement
Sign in to follow this  
Etnu

VS2K5 & PHP. [Solved]

This topic is 4987 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know of a decent way to get PHP working with VS2k5? There is a registry tweak you can perform for 2k2/2k3 that causes VS to treat it like it's a c/C++ source, but I can't seem to find an equivilent tweak for Whidbey. And, yes, I know i could just use a seperate text editor. But I don't want to. Thanks. Edit: I figured it out: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\Languages\File Extensions. Add a key for the file extension in question, and then just duplicate the GUID of the file type you'd like to be used. It's possible to create a complete extension for any language this way, at least with regards to syntax highlighting, but I just used the one for C++. Worked like a charm. [Edited by - Etnu on October 23, 2004 7:09:08 PM]

Share this post


Link to post
Share on other sites
Advertisement
Well, I don't have VS2K5, but have you tried placing the following key in your registry?
--------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
---------------------
The reason I recommend that specific key is that for VS2K3 the key was:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
----
and for VS2K2 the key was:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
------------------------------
You'll notice the keys for 02 and 03 are both the same with the exception of the \7.1\ instead of \7.0\, so I was thinking that you might just need the \8.0\. Of course, if you've tried this then I guess I'm wrong.

The place I found this information from also had a link to a 'usertype.dat' file that included keywords for PHP, which one had to place in to your Visual Studio IDE directory (Default install should be C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE).
This was the contents of the 'usertype.dat' file
(placed in source blocks to take up less space)

include
require
include_once
require_once
define
empty
null
array
foreach
in
as
eval
unset
boolean
break
case
class
default
do
echo
else
elseif
exit
for
function
if
php
php3
phpinfo
print
return
switch
while
var
global
true
false
new
abstract
interface
static
instanceof
implements
extends
private
public
protected


----------------------------------------------------------
I was just wondering, is this the same way that other people have enabled PHP syntax highlighting in VS.NET. I was just wondering of there was a different way to do it.

Share this post


Link to post
Share on other sites
Yes, that's the proper registry tweak, the problem is that they seem to have made significant changes to the registry layout. I've been poking around in there for a few hours trying to figure it out. Ah well.

Share this post


Link to post
Share on other sites
Etnu you changed the title of the thread to [Solved], so I am guessing you got it working?

What did you do?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!