What's the best way to develop local using PHP and Visual Studio?

I am taking my first foray into PHP programming and need to configure the environment for the first time. Can I use PHP with the built in VS web server or do I need to (and I hope not) use IIS locally?

In addition, any pointers on pitfalls to be avoided would be great.

Many thanks.

Update: I should have made the question more explicit. I am developing a ASP.Net MVC application.

Update 2: It's become clear that I haven't asked the question as cleanly as I would have liked. Here is what I am doing. I have an existing ASP.net MVC application that I am adding an e-mail form to. While researching, I came across this page: Ajax Forms with jQuery and I liked the interface he presented and thought I would try and adapt it. Calls are made to PHP functions and hence my question.

It is also clear that the confusion also could come from the fact that there is a better approach entirely. So, what is the way out of the maze, Alice?

Answers


For what you're doing, you really shouldn't be using the PHP scripts from that example.

Instead, you should be pulling data from the Form variables posted to the server on your own self-made pages. I don't know the "proper" way to do this using the MVC framework. With the ASP Forms framework, you'd do something like this to handle the POSTed data (example of the sendmail.php file)

string mailTo = Request.Form["emailTo"];
string mailFrom = Request.Form["emailFrom"];
string subject = Request.Form["subject"];
string message = Request.Form["message"];

// Send mail here using variables above
// You'll need an SMTP server and some mail 
// sending code which I'm drawing a blank as
//  to what the name of the classes are at the moment

There is probably a better way to handle this code in the MVC framework, but I haven't worked with it enough to tell you what it is.

Basically, you can't use PHP code at all for an ASP.NET app.


Need Your Help

Django: Question about model architecture

django django-models django-project-architect

Does this facade code look like a good idea, or is there anything inherently flawed about the design? More importantly, is there a problem I will likely run into down the road with this code? Any h...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.