Run ipconfig command with php

前端 未结 3 1398
醉梦人生
醉梦人生 2021-01-22 05:34

I use this code to understand some information of visitors (clients). It has been running on my virtual server on Xampp, but I can`t run on my main server (host). I see just a b

3条回答
  •  抹茶落季
    2021-01-22 06:01

    Well, since you clarified that the server is linux based, the correct command on linux is

    /sbin/ifconfig -a
    

    The data returned will look slightly different

    eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
              inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: 0000::000:0000:0000:0000/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:14141910 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6532919 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:4462743134 (4.4 GB)  TX bytes:1340503018 (1.3 GB)
              Interrupt:22 Memory:f6ae0000-f6b00000 
    

提交回复
热议问题