I am using linux commands like "rm -f" or executing some exe through php shell_exec but the command is not working in same manner as linux command line. What can be the problem? Thanks in Advance
$myfile = fopen("preOrder.txt", "w") or die("Unable to open file!");
if (isset($_POST['submit'])) {
$strg = $_POST['myText'];
fwrite($myfile, $strg);
fclose($myfile);
$lyparser_log=shell_exec('./lyparser.out < preOrder.txt');
$file1=fopen("log.txt","w");
fwrite($file1,$lyparser_log);
}