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.
我目前正计划使用 Symfony 的 ProcessBuilder,它允许设置一些将传递给proc_open调用的环境变量。
proc_open
我需要某个命令来更改TMPDIR,然后再恢复它,所以我想知道是否$TMPDIR在调用后恢复修改后的 env (以及修改后的 env 变量的值),还是需要恢复它我自己?如果需要特定命令(在我的情况下是ghostscript),这个值是否真的会改变?
TMPDIR
$TMPDIR
谢谢
经过一些测试,似乎函数中的$env参数proc_open真的是只在运行过程中修改环境。所以它基本上涵盖了我的问题。:}
$env