r1lex Posted April 9, 2007 Report Share Posted April 9, 2007 Mekleju tadu skriptu, ka saliekot kaada mape failus, tie automatiski ievietotos failu listee, kura butu pieejama visiem cilvekiem, kas apmekle web! Link to comment Share on other sites More sharing options...
march Posted April 9, 2007 Report Share Posted April 9, 2007 <?php if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) { echo "$file\n"; } closedir($handle); } ?> Link to comment Share on other sites More sharing options...
r1lex Posted April 9, 2007 Author Report Share Posted April 9, 2007 (edited) aizmirsu piebilst, ka vajadzetu tadu vizuali pievilcigaku, un ari ta lai failus varetu novilkt, piemeram uzspiezot uz faila nosaukuma vai uz bildites blakus. Ceru ka saprataat. :) Edited April 9, 2007 by r1lex Link to comment Share on other sites More sharing options...
waplet Posted April 9, 2007 Report Share Posted April 9, 2007 man ir viens kautcik sakarīgs! <?php if ($handle = opendir('faili/')) { while (false !== ($file = readdir($handle))) { if (strlen($file) > 4) { echo "<center><a href=\"faili/$file\">$file</a></br><br>---------------------------------------------------------------------</center>"; } } closedir($handle); } ?> shito ieliec index.php failā un uztaisi mapīti faili! nez negribēju neko mainīt cerams noderēs! Link to comment Share on other sites More sharing options...
r1lex Posted April 9, 2007 Author Report Share Posted April 9, 2007 man ir viens kautcik sakarīgs! <?php if ($handle = opendir('faili/')) { while (false !== ($file = readdir($handle))) { if (strlen($file) > 4) { echo "<center><a href=\"faili/$file\">$file</a></br><br>---------------------------------------------------------------------</center>"; } } closedir($handle); } ?> shito ieliec index.php failā un uztaisi mapīti faili! nez negribēju neko mainīt cerams noderēs! thanx sis normals Link to comment Share on other sites More sharing options...
waplet Posted April 9, 2007 Report Share Posted April 9, 2007 npk! Link to comment Share on other sites More sharing options...
andrisp Posted April 9, 2007 Report Share Posted April 9, 2007 Neiesaku šādu pārbaudi: strlen($file) > 4 Labāk kaut ko šādu: if ($file != '.' && $file != '..' && !preg_match('/^\.ht/', $file)) { // ir ok, izdrukaajam } Link to comment Share on other sites More sharing options...
*jancis38* Posted April 9, 2007 Report Share Posted April 9, 2007 thanx sis normals mjāā, šito es esmu uzrakstijis. xD iekš gign forumā, un uncfroft :) Link to comment Share on other sites More sharing options...
Recommended Posts