sevi_at wrote: 
> 
> 1) php befehl -exec('sudo /var/www/sudoscript.sh
> showsoundcard',$output,$return_var);-  in meiner sudoscript.sh wird dann
> folgendes ausgeführt
> 2) in der nächsten PHP Zeile lese ich mir dann das Ergebnis in ein array
> ein 
> -$datei = "usb_dev.txt"; // Name der Datei
> $array_usb_dev = file($datei); // Datei in ein Array einlesen-
> 3) Dann gebe ich den wert dieses array irgendwie aus.....
> 

Ich würde empfehlen, aplay -l direkt via 'shell exec'
(http://php.net/manual/en/function.shell-exec.php) auszuführen. Die
Ausgabe kann dann einfach in PHP bearbeitet werden, ein script ist also
nicht notwendig.
Generell ist es sowieso keine gute Idee, irgendetwas als root via einem
WebIf auszuführen, solange es nicht zwingend notwendig ist (aplay
benötigt ja keine root Rechte)



[ extGUI4LMS - an alternative web interface: 'forum'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
/ 'homepage' (http://code.google.com/p/extgui4lms/) ]
------------------------------------------------------------------------
Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=101321

_______________________________________________
slimserver-de mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/slimserver-de

Antwort per Email an