This is my PHP code for passing data to a C# exe file.
<?
shell_exec("p3.exe --tRyMe");
?>
What I want is, I'll post a string to p3.exe file, and that exe file prints "tRyme" string to the screen.
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string a;
Console.Write("Please enter a string : ");
a = Console.ReadLine();
Console.WriteLine("You have entered: {0}", a);
Console.ReadKey();
}
}
}
And this is my C# code.
I've tried "--tRyMe", "-tRyMe", "tRyMe" etc. to do that but, this code prints only "Please enter a string" to the screen.
What I want is see the output like:
You have entered: tRyMe
Can you help me with doing that? Best wishes.