Annotation of embedaddon/php/ext/standard/tests/general_functions/bug41518.phpt, revision 1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>