How to use command line for Rclone with PHP? (shell_exec, exec)

I want to use Rclone with PHP. My purpose is to run Rclone in the background.
Example:

echo shell_exec('cd/ && cd rclone && rclone config create gdrive drive config_is_local false');

Then I should enter confirmation code output of shell_exec function. But I can't answer to response. I tried:

echo shell_exec('echo'.$code.' | cd/ && cd rclone && rclone config create gdrive drive config_is_local false');

Or other way (while create a new remote):

echo shell_exec('echo "n" | cd/ && cd rclone && rclone config 2>&1);

I expect a new question(name?) but I output is blank page. How can I do it?

Does anyone have a similar example? (Rclone & PHP)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.