Date: 10/27/00
- Next message: Justo Alonso: "[PHP-DEV] Re: Project: Accessing HTTP reply header of include("http://..")"
- Previous message: owain <email protected>: "[PHP-DEV] PHP 4.0 Bug #7496: imap_fetchbody handling of part numbers in forwarded messages"
- In reply to: Whit: "[PHP-DEV] Re: PHP 4.0 Bug #7396 Updated: is_dir() doesn't work"
- Next in thread: Whit: "Re: [PHP-DEV] Re: PHP 4.0 Bug #7396 Updated: is_dir() doesn't work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can you explain the problem again without long examples? (Two lines if
possible).
What doesn't work?
Andi
At 11:07 PM 10/26/00 -0400, Whit wrote:
>Yeah, as I already responded a couple days back, the full path fixes it. The
>thing is until about halfway through the 3.x series this was not required
>... looks like folks besides me do get confused on it, you may want to be
>explicit in the manual.
>
>Whit
>
>On Fri, Oct 27, 2000 at 12:12:11PM -0000, Bug Database wrote:
> > ID: 7396
> > Updated by: sniper
> > Reported By: whit <email protected>
> > Status: Feedback
> > Bug Type: Filesystem function related
> > Assigned To:
> > Comments:
> >
> > Please check the example Jesus gave. And report back whether it
> > solves this or not.
> >
> > --Jani
> >
> > Previous Comments:
> > ---------------------------------------------------------------------------
> >
> > [2000-10-23 03:49:50] jmcastagnetto <email protected>
> > I could not reproduce the bug with a modified code, main difference is
> that I am using the full path in the is_file() function, as it should be.
> Code below works on PHP 4.0.3pl1 (RedHat 6.1 and Solaris 2.6):
> >
> > $dir ="/path/to/phpdoc/en";
> > $handle=opendir($dir);
> > while ($file = readdir($handle)) {
> > $retval[count($retval)] = $dir."/".$file;
> > }
> > closedir($handle);
> > sort($retval);
> > $cnt=count($retval);
> > echo "CNT: $cntn";
> > $int=0;
> > while($int<$cnt) {
> > if(is_file($retval[$int])) {
> > echo "File: ".$retval[$int]."n";
> > } else {
> > echo "Dir: ".$retval[$int]."n";
> > }
> > $int++;
> > }
> >
> >
> >
> > ---------------------------------------------------------------------------
> >
> > [2000-10-22 19:12:02] whit <email protected>
> > This snippet works:
> >
> > $handle=opendir($homedir);
> > while ($file = readdir($handle)) {
> > $retval[count($retval)] = $file;
> > }
> > closedir($handle);
> > sort($retval);
> > $cnt=count($retval);
> > echo "CNT: $cnt";
> > $int=0;
> > while($int<$cnt) {
> > if(!is_dir($retval[$int])) {
> > echo "File: $retval[$int]<br>";
> > } else {
> > echo "Dir: $retval[$int]<br>";
> > }
> > $int++;
> > }
> >
> > But if I change "if(!is_dir($retval[$int])) {" to
> "if(is_file($retval[$int])) {" it fails.
> >
> > The way it fails is that all of the files fail to match as files, and
> are shown prefixed by "Dir:".
> >
> >
> > ---------------------------------------------------------------------------
> >
> >
> > Full Bug description available at: http://bugs.php.net/?id=7396
>
>--
>
> \/\/ I-I I T
> Blauvelt
> whit <email protected>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Justo Alonso: "[PHP-DEV] Re: Project: Accessing HTTP reply header of include("http://..")"
- Previous message: owain <email protected>: "[PHP-DEV] PHP 4.0 Bug #7496: imap_fetchbody handling of part numbers in forwarded messages"
- In reply to: Whit: "[PHP-DEV] Re: PHP 4.0 Bug #7396 Updated: is_dir() doesn't work"
- Next in thread: Whit: "Re: [PHP-DEV] Re: PHP 4.0 Bug #7396 Updated: is_dir() doesn't work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

