Browsing array in php

0
<?php 
$command = system('python usb.py');
echo "<br>";

$arr1 = str_split($command);
$c = 0;
$i = 0;

while ($c == 0) {
    if (strcmp($str1[$i], " ")) {
        $c = 1;
    }
        echo $arr1[$i];

    $i++;
}


?>

The above code calls a python file that returns the USB storage devices connected to the server, something like this: /media/adryan/MULTIBOOT /dev/sdb1 I tried to get the value returned while the value contained in the array index was different from a space but the page does not load or the error ... can anyone help me with this?

    
asked by anonymous 06.07.2018 / 23:10

0 answers