How to make navigation?
So that this script creates a new page after 20 outputs and so on until the end of the files. Specifically needed for WordPress. Why do I need it? The page is too large. Or maybe there are other options, flash drive, flame - which is not very desirable.
$dir = opendir("/files/"); //путь к файлам while ($file = readdir($dir)) { if (($file != ".") && ($file != "..") && ($file != "index.php")) { $cat = "$file"; // строка, подлежащая частичной замене $r = array( "yo", "ye", "ts", "ch", "sh", "shch", "yu", "ya", "a", "b", "v", "g", "d", "e", "j", "z", "i", "y", "k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "e", "_", "h" ); // что менять ("a" и "b"); $r2 = array( "ё", "ё", "ц", "ч", "ш", "щ", "ю", "я", "а", "б", "в", "г", "д", "е", "г", "з", "и", "и", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "Э", " ", "х" ); // на что менять ("0" и "1"); $trans = str_ireplace($r, $r2, $cat); echo '<img src="/themes/present/images/PostCategoryIcon.png" WIDTH="50" HEIGHT="50" alt=""><a href="/files/' . $file . '">' .$trans. '</a><br>'; } } closedir($dir);