1--TEST-- 2Bug #41518 (file_exists() warns of open_basedir restriction on non-existent file) 3--SKIPIF-- 4<?php 5$tmp_dir = __DIR__ . '/bug41518'; 6mkdir($tmp_dir); 7if (!is_dir($tmp_dir)) { 8 die("skip"); 9} 10?> 11--INI-- 12open_basedir=. 13--FILE-- 14<?php 15 16$tmp_dir = __DIR__ . "/bug41518/"; 17$tmp_file = $tmp_dir."/bug41418.tmp"; 18 19touch($tmp_file); 20var_dump(file_exists($tmp_file)); //exists 21var_dump(file_exists($tmp_file."nosuchfile")); //doesn't exist 22 23@unlink($tmp_file); 24@rmdir($tmp_dir); 25echo "Done\n"; 26?> 27--EXPECT-- 28bool(true) 29bool(false) 30Done 31