laucinieks Posted December 12, 2010 Report Share Posted December 12, 2010 Ir vajadzīgs tā, lai no vienas mapes ņem thumbnailus, bet no otrās ņem lielās bildes. uz php esmu uzlicis, lai ņem lielās bildes, mēģināju likt arī, lai ņem thumbnailus no citas mapes, bet nesanāca. <?php $files = glob("images/slideshow/aksesuari/*.*"); for ($i=1; $i<count($files); $i++) { $bilde = $files[$i]; echo '<a href="'.$bilde.'" target="_blank"><img src="'.$bilde.'" alt="bilde" width="80" height="105"></a>'." "; } ?> Tur kur ir a href= tur jābūt $bilde , bet tur kur ir img src= tur jābūt thumbam, kurš atrodas mapē images/slideshow/aksthumb . Biju mēģinājis taisīt ar diviem for, bet nesanāca. Varbūt variet palīdzēt? Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 12, 2010 Report Share Posted December 12, 2010 (edited) <?php $files = glob("images/slideshow/aksesuari/*.*"); for ($i=1; $i<count($files); $i++) { $bilde = $files[$i]; $bilde_thumb=str_replace('aksesuari','aksthumb',$bilde); echo '<a href="'.$bilde.'" target="_blank"><img src="'.$bilde_thumb.'" alt="bilde" width="80" height="105"></a>'." "; } ?> galigi neglits risinajums, bet vajadzetu stradat. Edited December 12, 2010 by Blitz Quote Link to comment Share on other sites More sharing options...
mad182 Posted December 12, 2010 Report Share Posted December 12, 2010 Nezinu, vai labāks, bet citādāks variants: http://paste.php.lv/efe8bf00e62d070e52d64604b6bfa27f?lang=php Quote Link to comment Share on other sites More sharing options...
laucinieks Posted December 12, 2010 Author Report Share Posted December 12, 2010 Paldies :)! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.