Bir php çalıştırmak galeriye resim açıklamaları uygulama üzerinde çalışıyor ve her görüntü için her metin dosyasını aramak için nasıl anlamaya görünüyor olamaz. Ben görüntü için kodu bir div yerleştirin ve daha sonra dahil aramak gerekir.
//total number of images
$total = 77;
//max number of thumbnails per page
$max = 9;
//what image do we want to start from?
$startcount = $_GET["start"];
//if there is not a defined starting image, we start with the first
if(empty($startcount))
{
$startcount = 0;
}
//start off the loop at 1
$loop = 1;
//start the loop
while($loop <= $max)
{
//for the picture labels
$num = $startcount + $loop;
if($num > $total)
{
$num = $num - 1;
break;
}
// Add class="last" to every third list item
if(is_int($num / 3))
{
$last = ' class="last"';
}
else
{
$last = "";
}
//the code for the image
echo '
<li'.$last.'><a href="images/portfolio/pic-'.$num.'.jpg" rel="milkbox[gall1]"><img src="images/portfolio/thumbs/pic-'.$num.'-thumb.jpg" width="256" height="138" alt="Thumbnail of image '.$num.'" /></a><div>'.$num.'</div></li>';
Ben kullanarak sayısına göre metin dosyalarını arayabileceğiniz görüyoruz '. $ Num.' (Ben her bir ifade ile 77 ayrı metin dosyaları var) ama nasıl dosyaları aramak için bunu söylemek istiyorsun?