0

I need to run a specific PHP script which is located in the same folder with ASP.NET application.

Surely I can run it via WebClient, for example, using full public URL of the website, but I thought maybe there's a more logical way? To somehow launch it locally?

1
  • Using apache thrift, you can develop services that work between PHP and asp.net Commented Jan 16, 2013 at 16:33

1 Answer 1

1

Yes you can run the php file locally but if it does not rely on user interaction or external browser assets by using:

Process.Start("/path/to/php path/to/the/file.php", "any additional parameters");

or

System.Diagnostics.Process.Start("/path/to/php path/to/the/file.php", "any additional parameters");

or just:

system("/path/to/php path/to/the/file.php");

You can refer to http://php.net/manual/en/features.commandline.php

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

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.