proc-open

load .profile with proc_open()

99封情书 提交于 2019-11-26 14:39:17
问题 Here's the situation: I wrote a back end application, that runs on a certain server. On this server, there is a script that can be executed from the front end server, over ssh. My script will then check to see if the environment variables it needs are loaded correctly because I rely heavily on them in the script itself. This works, although not the way I want things to work. As the connection is established, the ./profile isn't loaded just using exec('source /home/user/.profile'); doesn't