Jump to content
Fórum Script Brasil
  • 0

codigo funcionando em servidor local mas não online


naldo_10

Question

Bom é o seguinte na função getThumb não ta sendo carregado as images

e em servidor local funciona sem problema

e tb nos links texto não ta indo para pagina correta , esta indo para pagina de erro 404 do servidor e não do site

mas o link ta correto sim e em localhost funciona

olhe o site :

Clique aqui

--inde.php-------------

<ul class="belo">
<?php $readBloco = read('up_posts',"WHERE tipo = 'post' AND status = '1' AND cat_pai = '10' ORDER BY data DESC LIMIT 2");
foreach($readBloco as $bl):
echo'<li class="gli">';
getThumb($bl['thumb'],$bl['tags'], $bl['titulo'], '175','100','','','#');

echo'<h1>'.$bl['titulo'].'</h1>';
  
echo'</li>'; 
endforeach;
?>                             
</ul><!-- /ulgames -->
function getThumb e function getHome da url amigaveis
function getThumb($img, $titulo, $alt, $w, $h, $grupo = NULL, $dir = NULL, $link = NULL, $a = NULL){ 
         
        //TIPOS DE CORTE 
        $a = ($a != NULL ? '&a='.$a : ''); 
    
         
        $grupo     = ($grupo != NULL ? "[$grupo]" : ""); 
        $dir     = ($dir != NULL ? "$dir" : "uploads"); 
        $verDir = explode('/',$_SERVER['PHP_SELF']); 
        $urlDir = (in_array('admin',$verDir) ? '../' : ''); 
         
        if(file_exists($urlDir.$dir.'/'.$img)){ 
            if($link == ''){ 
                echo ' 
                    <a href="'.BASE.'/'.$dir.'/'.$img.'" rel="prettyPhoto'.$grupo.'" title="'.$titulo.'"> 
                        <img src="'.BASE.'/tim.php?src='.BASE.'/'.$dir.'/'.$img.'&w='.$w.'&h='.$h.'&zc=1&q=100'.$a.'"  
                        title="'.$titulo.'" alt="'.$alt.'"> 
                    </a> 
                '; 
                
                
            }elseif($link == '#'){ 
                echo ' 
                        <img src="'.BASE.'/tim.php?src='.BASE.'/'.$dir.'/'.$img.'&w='.$w.'&h='.$h.'&zc=1&q=100'.$a.'"  
                        title="'.$titulo.'" alt="'.$alt.'"> 
                '; 
            }else{ 
                echo ' 
                    <a href="'.$link.'" title="'.$titulo.'"> 
                        <img src="'.BASE.'/tim.php?src='.BASE.'/'.$dir.'/'.$img.'&w='.$w.'&h='.$h.'&zc=1&q=100'.$a.'"  
                        title="'.$titulo.'" alt="'.$alt.'"> 
                    </a> 
                '; 
            } 
        }else{ 
            echo ' 
                <img src="'.BASE.'/tim.php?src='.BASE.'/images/default.jpg&w='.$w.'&h='.$h.'&zc=1&q=100'.$a.'"  
                title="'.$titulo.'" alt="'.$alt.'"> 
                '; 
        } 
    }
$url = (isset($_GET['url']))?$_GET['url']:NULL;
$url = explode('/', $url); 
$url[0] = ($url[0] == NULL ? 'index' : $url[0]); 
     
        if(file_exists('tpl/'.$url[0].'.php')){ 
             require_once('tpl/'.$url[0].'.php'); 
        }elseif(file_exists('tpl/'.$url[0].'/'.$url[1].'.php')){ 
             require_once('tpl/'.$url[0].'/'.$url[1].'.php'); 
        }else{ 
             require_once('tpl/404.php'); 
        } 
}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...