Date: 07/13/01
- Next message: gandolf_the_grey <email protected>: "[PHP-DEV] Bug #12159: Make fails, both 4.0.5 and 4.0.6 during microtime..."
- Previous message: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: craig <email protected>
Operating system: Win2K
PHP version: 4.0.6
PHP Bug Type: Strings related
Bug description: EVAL code not working correctly if IF block
<?php
$extensions=array(".htm",".asp");
$x="";
$numargs=count($extensions);
for ($i=0;$i<=$numargs-1;$i++){
$x=$x."strstr(\$filename,\"".$extensions[$i]."\")";
if ($numargs>0 && $i!=$numargs-1){
$x=$x." || ";
}
}
$validExtensions=$x;
echo $validExtensions;
$handle=opendir('.');
while (($filename = readdir($handle))!==false) {
if (is_file($filename)){
$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
if (eval($validExtensions)){
echo $filename."<br>";
}
fclose ($fd);
}
}
closedir($handle);
?>
-- Edit bug report at: http://bugs.php.net/?id=12158&edit=1-- 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: gandolf_the_grey <email protected>: "[PHP-DEV] Bug #12159: Make fails, both 4.0.5 and 4.0.6 during microtime..."
- Previous message: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

