|
Posted by Zbigniew Lisiecki on 05/10/05 21:09
Hi,
information one receives from is_dir() is out of date. In SuSE Linux 9.1
Kernel: 2.6.5-7.111 Apache/2.0.49, PHP Version 4.3.4. the following script:
$r = is_dir ($d1);
echo "isdir ( $d1 ) = $r";
if (is_dir ($d1)) {
$e = rename ($d1, $d2);
echo "rename ($d1, $d2) $e";
}
....
if (is_dir ($d2)) {
echo "destination dir $d2 already exists";
return (3);
}
leads to:
d1: /home/zbyszek/people/1/15523
d2: /home/zbyszek/people/1/17904
isdir ( /home/zbyszek/people/1/15523 ) = 1
rename (/home/zbyszek/people/1/15523, /home/zbyszek/people/1/17904) 1
....
d1: /home/zbyszek/people/2/200
d2: /home/zbyszek/people/1/15523
destination dir /home/zbyszek/people/1/15523 already exists !!!!!!!!!!!!
but the terminal shell says:
zbyszek@jane:~/people> ls 2/200 1/15523 1/17904
/bin/ls: 2/200: No such catalog
/bin/ls: 1/15523: No such catalog !!!!!!!!!!!!!!!!!!!!!!!!!
1/17904:
obviously is_dir($d2) gives the wrong result. could somebody help me, please
regards,
zbyszek lisiecki
--
http://zbyszek.evot.org
Navigation:
[Reply to this message]
|