change_information.php 302 Bytes
<?php
 //include('../cfg/file_name.php');

 $open_information = '/home/pi/Desktop/vAlert/log/info.txt';
 shell_exec("sudo chmod 777 ".$open_information);
 
 $fp = @fopen($open_information,'w')  or die("Unable to open file!");
 fwrite($fp, $_POST['information']);
 fclose($fp);
 echo "1";
?>