Как правильно реализовать fotorama api в php? - PullRequest
0 голосов
/ 05 сентября 2018

Я пытаюсь реализовать fotorama api, но что-то пошло не так, и я не могу увидеть ..... под изображением, как в примере

enter image description here

head.php

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">  
 </script> 

 <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet"> 

 <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"> 
</script> 

В классе product.php

      <div class="container-fluid">
         <div class="row" style="width:280px;height:360px">
            <div class="fotorama">

                <?php $photos = explode(',',$product['image']);
                 foreach($photos as $photo):
                   ?>
                   <?php /*<img src="<?= $product['image']; ?>" alt="<?= $product['title']; ?>" class="img-thumb-detailModal"> */?>
                   <img src="<?= $photo; ?>" alt="<?= $product['title']; ?>" class="img-thumb-detailModal">

                <?php endforeach;?>
              </div> <!-- fotorama div -->
              </div>
            </div>
 <script>
 $(function () {
 $('.fotorama').fotorama({'loop':true,'autoplay':true});
 });
 </script>
...