54header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on)
55header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks)
56
57print "*** TEST READ OF /tmp/test.txt FILE<br>\n";
58
59$out='';
60$ret=0;
61
62$file = '/tmp/test.txt';
63$f=fopen($file, 'r');
64if ($f) {
65 $s=fread($f, 4096);
66 print $s;
67 fclose($f);
68} else {
69 print "Failed to open file ".$file."<br>\n";
70}
71
72print '<br><br>'."\n";
73
74
75print "*** TEST READ OF /test.txt FILE AND LS /dev/std*<br>\n";
76
77exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret);