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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 12:05:52 2022 UTC