Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / appcache / resources / counter.php
blob7926faf03d1ebf7b90bd9d5c47a0f8b15db9487e
1 <?php
2 require_once '../../resources/portabilityLayer.php';
4 $tmpFile = sys_get_temp_dir() . "/" . "appcache_counter";
6 function stepCounter($file)
8 if (!file_exists($file)) {
9 file_put_contents($file, "0");
10 return "0";
12 $value = file_get_contents($file);
13 file_put_contents($file, ++$value);
14 return $value;
17 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
18 header("Cache-Control: no-cache, must-revalidate");
19 header("Pragma: no-cache");
20 header("Content-Type: text/plain");
22 print(stepCounter($tmpFile));