Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 PHP 脚本,它执行我的程序,我的程序启动另一个进程。但问题是,每次写入控制台输出时执行的 PHP 库存......我用 -A -m -d 参数测试了屏幕,但它没有打开进程(程序运行正常,但进程没有启动)。我不能用 C# 将输出写入控制台吗?或者如何忽略 PHP 并继续使用脚本?
比x好
你可以用它System.IO.Stream.Null来做到这一点:
System.IO.Stream.Null
using System; using System.IO; Console.SetOut(new StreamWriter(Stream.Null));