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