我正在尝试插入一个新行,以便可以添加动态回调,但是我没有取得多大成功;curl 不在打破脚本的全新行上。它位于 mkdir 旁边的最后一行。
File::put(storage_path('app/scripts/'.$rand.'.script'), $this->deployment->script);
File::append(storage_path('app/scripts/'.$rand.'.script'), ' \n');
// Doesn't break onto a new line.
File::append(storage_path('app/scripts/'.$rand.'.script'), $callbackURL);
$sendFile = ssh2_scp_send($connection, storage_path('app/scripts/'.$rand.'.script'), 'deploy.sh');
ssh2_exec($connection, 'sh deploy.sh');
任何援助将不胜感激!太感谢了。