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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: atom at suspicious dot org
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC