jam Posted April 19, 2006 Report Share Posted April 19, 2006 (edited) Ar shadu skripta gabalu bildes tiek nolasitas no X diras : $handle = @opendir($dir); $i=0; echo"<center><table cellspacing=13>"; while (false !== ($file = readdir($handle))) { if($file != "." && $file != "..") { $ext=explode(".",$file); $ext=strtolower($ext[1]); if(in_array($ext,$type)) { if($i==0) echo"<tr>"; echo '<td align="center">'; thumb("$dir/","$file",$w,$h,$r); echo"</td>"; $i++; if($i==$ncol) { echo"</tr>"; $i=0; } } } } redzamaa funkcija thumb () ir funkcija, kura no originala uztaisa thumbnaili onthefly. Vajadzetu sadalit lapaas rezultatus pec X skaita lapaa. Ka to izdariit? palasiijo skaisto sarakstu ar bubu sagatavotajie linkiem, bet, laikam, smadzenes pa iisu. Edited April 19, 2006 by jam Link to comment Share on other sites More sharing options...
Delfins Posted April 19, 2006 Report Share Posted April 19, 2006 1.) Ja smadzenes pa īsu, tad neķeries tam klāt.. 2.) Thumb-on-the-fly ir ļoti-slikti, ja vien nav pārbauda uz tā esamību Link to comment Share on other sites More sharing options...
jam Posted April 19, 2006 Author Report Share Posted April 19, 2006 1.) Ja smadzenes pa īsu, tad neķeries tam klāt..2.) Thumb-on-the-fly ir ļoti-slikti, ja vien nav pārbauda uz tā esamību 1) Ja esi par lepnu, neatbildi neko 2) ir paarbaude uz esamibu Link to comment Share on other sites More sharing options...
v3rb0 Posted April 19, 2006 Report Share Posted April 19, 2006 paņem papīru un uzzraksti kā notiek dalīšana lapās no usera puses, tad izdomā pseidokodu, un tad prasi ko no pseidokoda nemāki uzrakstīt iekš php. domāju ka visu mācēsi, jo neko vairāk kā ifus un ciklus tur nevajag. Link to comment Share on other sites More sharing options...
jam Posted April 19, 2006 Author Report Share Posted April 19, 2006 (edited) labi, nevajag sasprindzin'at savas peleekas shuunas, atradu citur:http://www.sitepoint.com/forums/showthread.php?t=302009&highlight=readdir Edited April 19, 2006 by jam Link to comment Share on other sites More sharing options...
Delfins Posted April 19, 2006 Report Share Posted April 19, 2006 A pirms topika veidošanas tu par to nebiji padomājis, ka bija vispirms jāpameklē ? Link to comment Share on other sites More sharing options...
Recommended Posts