A bug with Is_Dir function ?

From: Date: Tue, 11 Mar 2003 13:35:54 +0000
Subject: A bug with Is_Dir function ?
Groups: php.windows 
Request: Send a blank email to php-windows+get-18968@lists.php.net to get a copy of this message
Hi, I have a serious problem (bug ?) in my sript. Let see it : The goal of my sript is opening a folder and display it (very common). My sript receive a path called '$path' by POST method when starting. ************************** $path=$_POST['path']; ************************** $path is a correct folder on my computer. I can check the value of path in my script like that : ************************************* echo "<br> path's value is :".$path; --> The result is OK --> C:/phpdev/www/public ************************************* But when i try theses functions : ************************* echo is_dir($path); --> the result is 0 (bad) $handle = opendir($path); --> make an error (path is not a folder). ************************* So at this moment, you say ok, my path's syntax is wrong or my folder doesn't exist ? BUT if i put on the top of my sript this code (with the absolutly same path ! ): ****************************** $path="C:/phpdev/www/public" ******************************** The sript works fine and i have no error ! So i don't understand where is the problem. If you know what is the problem, Plese help !! I did not find any answer anywhere.... I'm using phpdev5 (php 4.2.3) thanks in advance ! Yohan

« previous php.windows (#18968) next »