summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/resources/write-temp-file.php
blob: 7abe358222b3ec6c35028b311b2f758d309eb1be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
require_once 'portabilityLayer.php';

if (!sys_get_temp_dir()) {
    echo "FAIL: No temp dir was returned.\n";
    exit();
}

$tmpFile = sys_get_temp_dir() . "/" . $_GET['filename'];

if (!file_put_contents($tmpFile, $_GET['data'])) {
    echo "FAIL: unable to write to file: " . $tmpFile . "\n";
    exit();
}

echo $tmpFile;
?>