summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug41518.phpt
blob: 3b5ad3a8336ada76b694cdf9b15d03f113b28400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
Bug #41518 (file_exists() warns of open_basedir restriction on non-existent file)
--SKIPIF--
<?php
$tmp_dir = __DIR__ . '/bug41518';
mkdir($tmp_dir);
if (!is_dir($tmp_dir)) {
    die("skip");
}
@unlink($tmp_dir);
?>
--INI--
open_basedir=.
--FILE--
<?php

$tmp_dir = __DIR__ . "/bug41518/";
@mkdir($tmp_dir);
$tmp_file = $tmp_dir."/bug41418.tmp";

touch($tmp_file);
var_dump(file_exists($tmp_file)); //exists
var_dump(file_exists($tmp_file."nosuchfile")); //doesn't exist

@unlink($tmp_file);
@rmdir($tmp_dir);
echo "Done\n";
?>
--CLEAN--
<?php
$tmp_dir = __DIR__ . "/bug41518/";
@unlink($tmp_dir);
?>
--EXPECT--
bool(true)
bool(false)
Done