1

Is there anyway to call PHP script from a .Net application and pass in some parameters?

3 Answers 3

3

You can do it through a command line call

php your-file.php parameter1 parameter2

The parameters are available in the $_SERVER['argv'] variable.

Sign up to request clarification or add additional context in comments.

Comments

3

I've got interop with .NET and PHP using web services. You can output XML from both, which means you can call each way.

1 Comment

Yeh this is very easy to just do a post with content type application/xml.
1

If you have the PHP runtime installed you can still launch a new process to execute the script.

Have a look at the Process class.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.