# vim /etc/rc.d/rc.local
route add default gw 192.168.0.255 eth0
route add -net 10.0.1.0 netmask 255.255.255.0 gw 192.168.0.255 eth0
:wq我知道PHP 调用系统底层命令 用exec 但是想知道 如何将这三句 同时执行呢?
route add default gw 192.168.0.255 eth0
route add -net 10.0.1.0 netmask 255.255.255.0 gw 192.168.0.255 eth0
:wq我知道PHP 调用系统底层命令 用exec 但是想知道 如何将这三句 同时执行呢?
将命令写成一个shell 然后调用shell执行.
你说的那个root权限 是否可以通过修改visudo获取?实在是不会写shell脚本啊 来不及学了。
route add default gw 192.168.0.255 eth0
route add -net 10.0.1.0 netmask 255.255.255.0 gw 192.168.0.255 eth02,chown root script.sh3,chmod u+s+x o+x script.sh4,php: system('./script.sh');
$abc = `ps -ef`;
echo $abc;