您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 施行linux 命令

2026/2/17 13:45:44发布13次查看
php 执行linux 命令
# 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 但是想知道 如何将这三句 同时执行呢?
------解决方案--------------------
最近也在做路由,我们的处理方法是,把文件写到文档里rc.local 里 然后system() 这个文件
------解决方案--------------------
1,脚本script.sh
c/c++ code#!/bin/bashroute add default gw 192.168.0.255 eth0route add -net 10.0.1.0 netmask 255.255.255.0 gw 192.168.0.255 eth0

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product