时间:2021-07-01 10:21:17 帮助过:19人阅读
>>>>[0601_Access_S5352]dis arp
>>>>IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
>>>>--------------------------------------------------------------------------
>>>>192.168.66.11 0016-413e-0c62 SF- GE0/0/23 66
>>>>192.168.66.13 0019-b906-e2ec S-- GE0/0/18 66
>>>>192.168.66.15 0019-b906-be56 S-- GE0/0/16 66
>>>>192.168.66.17 0018-8b1e-96df SF- GE0/0/45 66*
给一段代码吧,想提取ipaddress,macaddress,interface,vpninstance 四段数据
写入mysql数据库,是多行的,
>>>>insert into ip_interface (ipaddress,macaddress,interface,vpn) values ('192.168.66.11','0016-413e-0c62','GE0/0/23','66');*
PHP采用正则表达式提取四列数据,存成数组,将数据批量导入mysql数据库中
>>>>[0601_Access_S5352]dis arp
>>>>IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
>>>>--------------------------------------------------------------------------
>>>>192.168.66.11 0016-413e-0c62 SF- GE0/0/23 66
>>>>192.168.66.13 0019-b906-e2ec S-- GE0/0/18 66
>>>>192.168.66.15 0019-b906-be56 S-- GE0/0/16 66
>>>>192.168.66.17 0018-8b1e-96df SF- GE0/0/45 66*
给一段代码吧,想提取ipaddress,macaddress,interface,vpninstance 四段数据
写入mysql数据库,是多行的,
>>>>insert into ip_interface (ipaddress,macaddress,interface,vpn) values ('192.168.66.11','0016-413e-0c62','GE0/0/23','66');*