raspberry pi1 model b, with pixel의 3

1340 단어 RaspberryPi1
개요
시작할 때 IP 주소가 표시됩니다.
사진.

컨디션
Raspberry pi 1 model b(element14)
raspbian 2016-11-25 jessie with pixel
sd_card MF-RUMSD08GL elecom
HDMI to VGA adapter(amazon)
usb keyboard(nec)
usb mouse(nec)
차리다
aptitude install apache2 php5
설정
브라우저 주소
샘플 코드
<HTML>
<BODY>
<h1>

<?php

$cmd = "ifconfig";
$data = `$cmd`;

foreach (preg_split("/\n\n/", $data) as $int) 
{
    preg_match("/^([A-z]*\d)\s+Link\s+encap:([A-z]*)\s+HWaddr\s+([A-z0-9:]*).*" .
            "inet addr:([0-9.]+).*Bcast:([0-9.]+).*Mask:([0-9.]+).*" .
            "MTU:([0-9.]+).*Metric:([0-9.]+).*" .
            "RX packets:([0-9.]+).*errors:([0-9.]+).*dropped:([0-9.]+).*overruns:([0-9.]+).*frame:([0-9.]+).*" .
            "TX packets:([0-9.]+).*errors:([0-9.]+).*dropped:([0-9.]+).*overruns:([0-9.]+).*carrier:([0-9.]+).*" .
            "RX bytes:([0-9.]+).*\((.*)\).*TX bytes:([0-9.]+).*\((.*)\)" .
            "/ims", $int, $regex);
    if (!empty($regex)) 
    {
        echo $regex[4];
    }
}

?>

</h1>
</BODY>
</HTML>


좋은 웹페이지 즐겨찾기