Couldn't open $file for writing!

"); fwrite($fp, $data) or die("

Couldn't write values to file!

"); fclose($fp); echo "

Saved to $file successfully!

"; echo"

Compiling the program $file
Error list:
"; $output1 = shell_exec("g++ $srcpath -o $executable 2>&1"); echo "$output1"; echo "

"; echo "

Running the program:
"; $output2 = shell_exec("echo $stdin | $executable $args"); echo "$output2"; echo "

"; shell_exec("rm -rf $srcpath $executable"); } else { echo "

Enter your code in the left frame and hit run to display the output.

"; } ?>