1--TEST--
2Test readfile() function : variation - test include path
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 = "readfileVar6.dir";
14mkdir($thisTestDir);
15chdir($thisTestDir);
16
17$filename = "afile.txt";
18$secondFile = $dir2."/".$filename;
19
20$newpath = create_include_path();
21set_include_path($newpath);
22runtest();
23teardown_include_path();
24chdir("..");
25rmdir($thisTestDir);
26
27
28function runtest() {
29   global $secondFile, $filename;
30   $h = fopen($secondFile, "w");
31   fwrite($h, "File in include path");
32   fclose($h);
33   readfile($filename, true);
34   echo "\n";
35   unlink($secondFile);
36}
37
38?>
39--EXPECT--
40*** Testing readfile() : variation ***
41File in include path
42