Assalomu alaykum, yordam.uz saytimizga xush kelibsiz.
Bu saytda o`zingizni qiziqtirgan savollarga javob olishingiz va o`z sohangiz bo`yicha savollarga javob berishingiz mumkin. Bizning Oilamizga a'zo bo`lganingiz uchun chuqur Minnatdorchilik bildiramiz !!!

yii 2 da rasm baseurlsi bor 'view' da img tag bilan berilganda ochmayapti

+1 ovoz
84 marta ko‘rilgan
so‘radi 19 sentabr, 18 Blackstar_valley (62 bal)
view

<div class="container">
    
  <div class="row">
    <?php foreach($mobilephones as $mobilephone): ?>
    <div class="col-md-4">
        <a style="text-decoration: none;" href="pulpitrock.jpg" class="thumbnail">  
          <h3 style="text-align: center;"> <?=$mobilephone->gname; ?> </h3>
         <?= Html::img($mobilephone->gipath, ['alt' => 'My logo']) ?>
      </a>
    </div>
      <?php    endforeach; ?>
   
  </div>
    <?php
    echo LinkPager::widget([
     'pagination'=>$pagination,
     ]); ?>
</div>

databaseda rasm url korinishi

F:/wamp64/www/yii2advanced/advanced/frontend/web/uploads/20180114_120844.jpg

1 ta javob

0 ovoz
javob berdi 19 sentabr, 18 MrHope (860 bal)
tanlangan 20 sentabr, 18 Blackstar_valley
 
Eng yaxshi javob

brovzerni console ni ochib url har xil tipda yozib ko'ring . shunda qaysi url orqali kelishini topishiz mumkin  va shu tartibda saqlashiz kerak bo'ladi. Xamppdan ko'ra Openserverni ishlatganiz maqulroq

mislo:

1)F:/wamp64/www/yii2advanced/advanced/frontend/web/uploads/20180114_120844.jpg

2)yii2advanced/advanced/frontend/web/uploads/20180114_120844.jpg

3)advanced/frontend/web/uploads/20180114_120844.jpg

4)frontend/web/uploads/20180114_120844.jpg

5)web/uploads/20180114_120844.jpg

6)uploads/20180114_120844.jpg

Assalomu alaykum, yordam.uz saytimizga xush kelibsiz.

Bu saytda o`zingizni qiziqtirgan savollarga javob olishingiz va o`z sohangiz bo`yicha savollarga javob berishingiz mumkin.

Bizning Oilamizga a'zo bo`lganingiz uchun chuqur Minnatdorchilik bildiramiz !!!

Telegram kanal YordamUzRss

...