2007-06-01 13:35:23 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #41518 (file_exists() warns of open_basedir restriction on non-existent file)
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2008-08-25 13:42:55 +00:00
|
|
|
$tmp_dir = __DIR__ . '/bug41518';
|
2008-08-17 13:07:39 +00:00
|
|
|
mkdir($tmp_dir);
|
|
|
|
if (!is_dir($tmp_dir)) {
|
2007-06-01 13:35:23 +00:00
|
|
|
die("skip");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--INI--
|
2008-08-17 13:07:39 +00:00
|
|
|
open_basedir=.
|
2007-06-01 13:35:23 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2008-08-25 13:42:55 +00:00
|
|
|
$tmp_dir = __DIR__ . "/bug41518/";
|
2007-06-01 13:35:23 +00:00
|
|
|
$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
|
|
|
|
|
2007-06-04 17:18:51 +00:00
|
|
|
@unlink($tmp_file);
|
2008-08-17 13:07:39 +00:00
|
|
|
@rmdir($tmp_dir);
|
2007-06-01 13:35:23 +00:00
|
|
|
echo "Done\n";
|
|
|
|
?>
|
2008-08-25 13:42:55 +00:00
|
|
|
--EXPECT--
|
2007-06-01 13:35:23 +00:00
|
|
|
bool(true)
|
|
|
|
bool(false)
|
|
|
|
Done
|