lordfritte
Lieutenant
- Registriert
- Juli 2006
- Beiträge
- 1.013
Hallo ich habe ein kleines Problem, ich möchte eine php datei über die php-cgi.exe mit c# parsen.
bei "p.StandardOutput.ReadToEnd();" bekomme ich aber eine Exception:
Code:
Process p = new Process();
p.StartInfo.FileName = "D:\\xampp\\php\\php-cgi.exe";
p.StartInfo.CreateNoWindow = true;
p.StartInfo.Arguments = "C:\\phptest.php";
p.Start();
if (!p.WaitForExit(10000))
{
p.Kill();
throw new Exception("Php TimeOut");
}
string res = p.StandardOutput.ReadToEnd();
bei "p.StandardOutput.ReadToEnd();" bekomme ich aber eine Exception:
Code:
StandardOut wurde nicht umgeleitet, oder der Prozess wurde noch nicht gestartet.