Autor | Zpráva | ||
---|---|---|---|
mechanix Profil * |
#1 · Zasláno: 6. 12. 2006, 15:39:49
Potreboval by som aby mi tento skript zobrazoval LEN subory JPG!
<html> <head> <title>Index Page</title> </head> <body> <?php if ($handle=opendir('.')) { while ($file = readdir($handle)) { $polozky[count($polozky)] = $file; } closedir($handle); sort($polozky); } reset($polozky); while (list($key, $val) = each($polozky)) { if ($val != "." && $val != "..") { if (is_dir($val)) { echo "(DIR) "; echo "<a href=\"$val\">$val</a><br>\n"; } } } echo "<br>\n"; reset($polozky); while (list($key, $val) = each($polozky)) { if ($val != "." && $val != "..") { if (!is_dir($val)) { echo "<a href=\"$val\">$val</a><br>\n"; } } } ?> </body> </html> |
||
nightfish Profil |
#2 · Zasláno: 6. 12. 2006, 15:44:50
if ($handle=opendir('.')) {
while ($file = readdir($handle)) { $polozky[count($polozky)] = $file; } closedir($handle); sort($polozky); } změnit na if ($handle=opendir('.')) { while ($file = readdir($handle)) { if (($file == ".") || ($file == "..")) continue; if ((substr($file,-4) != ".jpg") && (substr($file,-5) != ".jpeg")) continue; $polozky[] = $file; } closedir($handle); sort($polozky); } |
||
mechanix Profil * |
#3 · Zasláno: 6. 12. 2006, 16:03:09
nightfish
Ďakujem za radu! Funguje to! :-) |
||
Časová prodleva: 17 let
|
Toto téma je uzamčeno. Odpověď nelze zaslat.
0