Generate a linux shell command with php that contains the "tab" character

157 views Asked by At

I have to call a shell command with PHP. Therefore I use shell_exec(). That works fine for me. But now I have to pass two parameters that have to be separated by the TAB character. I tried to use \t but that won't work at all. How can I make this work?

I want to call aria2c and have to seperate two or more URIs by the TAB character. I tried the following piece of code:

aria2c --ftp-user username --ftp-passwd pwd -c -p -t 100 -s 2 --max-connection-per-server 2 --max-download-limit=0 --allow-overwrite=true --file-allocation none --summary-interval 0 ftp://server/xxx ftp://server/xxx -o files/xxx files/xxx

URI ftp://server/xxx ftp://server/xxx has to be something like this: ftp://server/xxx\tftp://server/xxx

0

There are 0 answers