summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/fopen_variation9.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file/fopen_variation9.phpt')
-rw-r--r--ext/standard/tests/file/fopen_variation9.phpt58
1 files changed, 25 insertions, 33 deletions
diff --git a/ext/standard/tests/file/fopen_variation9.phpt b/ext/standard/tests/file/fopen_variation9.phpt
index 5479ddcf2d..fa1ebcf4e0 100644
--- a/ext/standard/tests/file/fopen_variation9.phpt
+++ b/ext/standard/tests/file/fopen_variation9.phpt
@@ -4,12 +4,6 @@ Test fopen() function : variation: use include path and stream context create a
Dave Kelsey <d_kelsey@uk.ibm.com>
--FILE--
<?php
-/* Prototype : resource fopen(string filename, string mode [, bool use_include_path [, resource context]])
- * Description: Open a file or a URL and return a file pointer
- * Source code: ext/standard/file.c
- * Alias to functions:
- */
-
require_once('fopen_include_path.inc');
$thisTestDir = basename(__FILE__, ".php") . ".dir";
@@ -29,37 +23,35 @@ chdir("..");
rmdir($thisTestDir);
function runtest() {
- $tmpfile = basename(__FILE__, ".php") . ".tmp";
- $h = fopen($tmpfile, "w", true);
- fwrite($h, "This is the test file");
- fclose($h);
-
-
- $h = @fopen($tmpfile, "r");
- if ($h === false) {
- echo "Not created in working dir\n";
- }
- else {
- echo "created in working dir\n";
- fclose($h);
- unlink($tmpfile);
- }
-
- $h = @fopen('dir1/'.$tmpfile, "r");
- if ($h === false) {
- echo "Not created in dir1\n";
- }
- else {
- echo "created in dir1\n";
- fclose($h);
- unlink('dir1/'.$tmpfile);
- }
+ $tmpfile = basename(__FILE__, ".php") . ".tmp";
+ $h = fopen($tmpfile, "w", true);
+ fwrite($h, "This is the test file");
+ fclose($h);
+
+
+ $h = @fopen($tmpfile, "r");
+ if ($h === false) {
+ echo "Not created in working dir\n";
+ }
+ else {
+ echo "created in working dir\n";
+ fclose($h);
+ unlink($tmpfile);
+ }
+
+ $h = @fopen('dir1/'.$tmpfile, "r");
+ if ($h === false) {
+ echo "Not created in dir1\n";
+ }
+ else {
+ echo "created in dir1\n";
+ fclose($h);
+ unlink('dir1/'.$tmpfile);
+ }
}
?>
-===DONE===
--EXPECT--
created in working dir
Not created in dir1
created in working dir
Not created in dir1
-===DONE===