1--TEST--
2Test readfile() function : variation
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--FILE--
6<?php
7require_once('fopen_include_path.inc');
8
9echo "*** Testing readfile() : variation ***\n";
10// this doesn't create the include dirs in this directory
11// we change to this to ensure we are not part of the
12// include paths.
13$thisTestDir = "readfileVar7.dir";
14mkdir($thisTestDir);
15chdir($thisTestDir);
16
17$filename = "readFileVar7.tmp";
18$scriptLocFile = __DIR__."/".$filename;
19
20$newpath = create_include_path();
21set_include_path($newpath);
22runtest();
23teardown_include_path();
24chdir("..");
25rmdir($thisTestDir);
26
27
28function runtest() {
29   global $scriptLocFile, $filename;
30   $h = fopen($scriptLocFile, "w");
31   fwrite($h, "File in script location");
32   fclose($h);
33   readfile($filename, true);
34   echo "\n";
35   unlink($scriptLocFile);
36}
37
38?>
39--EXPECT--
40*** Testing readfile() : variation ***
41File in script location
42