PHP kullanarak bir dizin Görüntüler oku

0 Cevap php

WordPress içinde PHP ile bu mümkün.

Temelde ben bir atlıkarınca kurulum içine bir PHP dosyası içinde okumak istiyorum ki, (bu görüntüleri değiştirmek gibi) birçok görüntü 1'den oluşan "tanıtımlarını" adlı sitemde bir dizin varsa, yani buna benzer bir şey:

   <div class="scrollable" id="browsable">   

   <div class="items"> 

          <?php 
            $tot_images_from_promo_dir = [get_total_image_count_in_promos_dir]; 

            for ( $counter = 1; $counter <= $tot_images_from_promo_dir; $counter ++) {
                echo "<div>";
                    echo "<a href="#"><img src="[image_from_promo_directory]" /></a>
                echo "</div>";
            }
          ?>
    </div>
</div>

Hope the above makes sense, but basically want to somehow with php read total amount of images in my promo directory and then use this total in my loop max value and read each image file name in the promo directory and pass into my

Gerçekten bunu yapmak php sözdizimi seviniriz.

Teşekkürler.

0 Cevap