dongze8698 2015-06-16 09:13
浏览 34

使用包含“tab”字符的php生成linux shell命令

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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题