2 /* Prototype : resource fopen(string filename, string mode [, bool use_include_path [, resource context]])
3 * Description: Open a file or a URL and return a file pointer
4 * Source code: ext/standard/file.c
8 require_once('fopen_include_path.inc');
10 $thisTestDir = "fopenVariation16.dir";
14 $newpath = create_include_path();
15 set_include_path($newpath);
18 $newpath = generate_next_path();
19 set_include_path($newpath);
22 teardown_include_path();
23 restore_include_path();
30 $extraDir = "extraDir";
32 mkdir($dir1.'/'.$extraDir);
35 $tmpfile = $extraDir.'/fopen_variation16.tmp';
37 $h = fopen($tmpfile, "w+", true);
38 fwrite($h, (binary
) "This is the test file");
41 $h = @fopen
($dir1.'/'.$tmpfile, "r");
43 echo "Not created in dir1\n";
46 echo "created in dir1\n";
50 $h = fopen($tmpfile, "r", true);
52 echo "could not find file for reading\n";
55 echo "found file - not in dir1\n";
60 rmdir($dir1.'/'.$extraDir);