CodeIgniter Forums

Full Version: Problema with image loading
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]SoulM4n[/eluser]
Hi all,
i've made a simple controller that displays a small gallery of thumbnails (using pagination class) and i noticed that sometimes some of the thumbs don't get loaded (random problem).

Does anyone can tell me if there's a problem of configuration or incompatibility ?
I get this problem in my development machine (Windows 7 Ultimate 64Bit + IIS + PHP5) and also in the online version (hosting linux with PHP 5).

Thanks in advance and sorry for my bad english.

Marco

El Forum

[eluser]Ben Edmunds[/eluser]
Hey Marco,

Are you using base_url/site_url or relative paths?

Better yet just post your code.


Thanks,

El Forum

[eluser]SoulM4n[/eluser]
hi,
yes using base_url in some cases ? why ?

El Forum

[eluser]danmontgomery[/eluser]
[quote author="Ben Edmunds" date="1263328495"]just post your code.[/quote]

El Forum

[eluser]SoulM4n[/eluser]
Hi,
here is the code :

Code:
foreach ($records->result() as $row)
       {
          
           if (($j==1) or ($j==5) or ($j==9) or ($j==13) or (j==17))
           {
               echo "<tr>";
               $opentag = true;    
           }
          
          
           echo '<td align="center">';
           $thumb = array('src'=>'portfoliofolders/'.$folder.'/thumb/'.$row->thumb, 'class'=>'gallerythumb', 'border'=>'0');
           $image = base_url().'portfoliofolders/'.$folder.'/'.$row->image;
           echo anchor($image,img($thumb),'rel="prettyPhoto[iframe]"');
          
           echo '<div id="boxcommands">';
        echo img('images/share.gif').'&nbsp;';
        echo img('images/addtofav.gif');                                
        echo '</div>';          
           echo '</td>';
          
          
        if (($j==4) or ($j==8) or ($j==12) or ($j==16) or ($j==20))
        {
            echo "</tr>";    
            $opentag=false;
        }
          
           $j++;
       }

But i get the same problem opening the home page .. here is the code :

Code:
$thumb3 = array('src'=>'images/banner_web.jpg', 'class'=>'indexthumb');
echo '<td width="320" align="center">'.img($thumb3).'</td></tr>';

Sometimes the images being loaded perfeclty and sometimes not even if the src is always correct.

Thanks,

Marco