php-command

----------write data in file /var/www/html/command.txt ---------------

<?php

$myfile = fopen("command.txt", "w") or die("Unable to open file!");

$txt = "led1\n";

fwrite($myfile, $txt);

$txt = "on\n";

fwrite($myfile, $txt);

fclose($myfile);

echo "OK---led on done";

?>