php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10465 absolute path dosen't work with file_exists()
Submitted: 2001-04-23 16:52 UTC Modified: 2001-06-03 04:03 UTC
From: atom at suspicious dot org Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: linux 2.4.2 (red-hat 6) i686
Private report: No CVE-ID: None
 [2001-04-23 16:52 UTC] atom at suspicious dot org
file_exists () works fine with reletive paths, but seems to not work with absolute paths, or paths starting with '../'

this works fine:
--------------------------------------------------------------
if(file_exists(test/123)) {
            die ("error message");
    }


this does not work:
--------------------------------------------------------------
if(file_exists(/tmp/test/123)) {
            die ("error message");
    }



this does not work:
--------------------------------------------------------------
if(file_exists(../../tmp/test/123)) {
            die ("error message");
    }


thanks... atom

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-03 04:03 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

(works for me just fine)

-Jani

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 21:05:52 2022 UTC