Hello!
I want to call a php-script out of a C#-Application and get the output of the php-script as result:
This works fine in XP, but in Vista, sOutput keeps empty - any ideas what could be wrong?Code:// Call PHP System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = sPathToPhp+"php.exe"; proc.StartInfo.Arguments = sScript + " " + sParameter; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.CreateNoWindow = true; proc.Start(); proc.WaitForExit(); String sOutput = proc.StandardOutput.ReadToEnd(); proc.Close();




Reply With Quote