Edit report at http://bugs.php.net/bug.php?id=54803&edit=1

 ID:                 54803
 User updated by:    vinirresko at hotmail dot com
 Reported by:        vinirresko at hotmail dot com
 Summary:            file_exists() error.
-Status:             Feedback
+Status:             Open
 Type:               Bug
 Package:            *Directory/Filesystem functions
 Operating System:   Windows XP SP3
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

Right, i'll send the archive, ok ?

<?

$includes = array();

$includes[0] = '/class/conexao.class.php';

$includes[1] = '/class/query.class.php';



for($i = 0; $i < count($includes);$i++){

   try{

        if(file_exists($includes[$i])){

                include_once($includes[$i]);

        }else{

                throw new Exception("Arquivo ".$includes[$i]." não existe.");

        }

        }catch(Exception $e){

                        print "<script>alert('".$e->getMessage()."')</script>";

                        exit;

                }

}

?>


Previous Comments:
------------------------------------------------------------------------
[2011-05-18 10:33:08] paj...@php.net

No idea what's wrong. Please provide all info I ask and tell us if part
of the 

path is a junction or something similar. Is it actually a file? a
directory?

------------------------------------------------------------------------
[2011-05-18 10:20:21] vinirresko at hotmail dot com

Yes, it can be read, and if i test:



require_once("/class/test.php");



it is accepted, so i think who the problem is on the file_exists()
function.

------------------------------------------------------------------------
[2011-05-18 10:15:27] paj...@php.net

Also use an absolute path with the drive name if the current drive is
not the one 

where this file is (/foo is not an absolute path on windows, c:/foo
is).



See the cacls command or the file property to read the perms.

------------------------------------------------------------------------
[2011-05-18 10:11:05] vinirresko at hotmail dot com

How can I see the permissions of the file ?



I think this is not blocked.

------------------------------------------------------------------------
[2011-05-18 09:39:40] paj...@php.net

What are the permissions of this file? 



Also I'm not sure what it is exactly, you say directory but it seems
that you look 

for a file.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=54803


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54803&edit=1

Reply via email to