Помощ с скрипт

mizarck

Registered
Здравейте,
имам проблеч с един скрипт и нз как да го реша
ето скрипта
Код:
<?php
echo '<table border=0 cellspacing=0 cellpadding=0>';
echo '<tr>';
   $dir = scandir('.');
   $files = count( $dir );
   for ( $i = 0; $i < $files; $i++ )
   {
       if ( is_file($dir[$i]) && strlen( $dir[$i] ) <= 36 && ( strstr( strtolower( $dir[$i] ), '.jpg' ) ||  strstr( strtolower( $dir[$i] ), '.jpeg' ) ||  strstr( strtolower( $dir[$i] ), '.gif' ) ||  strstr( strtolower( $dir[$i] ), '.bmp' ) ||  strstr( strtolower( $dir[$i] ), '.png' ) ||  strstr( strtolower( $dir[$i] ), '.gif' ) ) )
       if ( is_file($dir[$i]) )
            echo "<td><img src=$dir[$i]></img></td>";
   }
echo '</tr>';
echo '<tr>';
   for ( $i = 0; $i < $files; $i++ )
   {
   if ( is_file($dir[$i]) && strlen( $dir[$i] ) <= 36 && ( strstr( strtolower( $dir[$i] ), '.txt' ) ) )
       if ( is_file($dir[$i]) )
       if ( is_file($dir[$i]) )
echo "<td><center><b>";
 
            include '$dir[$i]';
   }
echo "</b></center></td>";
echo '</tr>';
echo '</table>';
?>
ето какво ми дава след като го тествам през HTTP

FireFox каза:
Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21
Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21


Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21


Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21


Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21

Warning: include($dir[$i]) [function.include]: failed to open stream: No such file or directory in V:\Core\htdocs\worm\index.php on line 21

Warning: include() [function.include]: Failed opening '$dir[$i]' for inclusion (include_path='.;C:\php5\pear') in V:\Core\htdocs\worm\index.php on line 21
а ето какво се опитвам да направя
изкам под всяка картинка да инклудна соответният txt файл

картинките и txt файловете са под следният ред 00X

ПЛС кажете каде греша и как да оправя грешката

Благодаря предварително
 
include ($dir[$i]);

не съм преглеждал кода, може да имаш и други грешки, това ми се наби на очи като прегледах грешките
 
Slavei каза:
include ($dir[$i]);

не съм преглеждал кода, може да имаш и други грешки, това ми се наби на очи като прегледах грешките
явно имам и други грешки защото това го пробвах по следните начини
include ($dir[$i]);
include ('$dir[$i]');
include ("$dir[$i]");
include $dir[$i];
include "$dir[$i"];
include '$dir[$i]';

и пак дава същата грешка
 

Back
Горе