2 require_once 'portabilityLayer.php';
4 if (!sys_get_temp_dir()) {
5 echo "FAIL: No temp dir was returned.\n";
9 $tmpFile = sys_get_temp_dir() . "/" . $_GET['filename'];
11 if (!file_put_contents($tmpFile, "test")) {
12 echo "FAIL: unable to write to file: " . $tmpFile . "\n";
15 if (!unlink($tmpFile)) {
16 echo "FAIL: Unable to delete file: " . $tmpFile . "\n";