Jump to content
Fórum Script Brasil
  • 0

Dai me ajuda aqui com essa url tb


naldo_10

Question

pega url certinho assim mas não lista conteudo :

</br>

http://localhost/cursos/prophp/projeto/art...unis-tomam-cafe

</br>

The requested URL /cursos/prophp/projeto/artigo/ashton-kutcher-e-mila-kunis-tomam-cafe was not found on this server.

</br>

sera que a artigo.php certo, logo abaixo ta a index e a artigo

</br>

http://localhost/cursos/prophp/projeto/art...unis-tomam-cafe

</br>

index.php

<?php 
$readSlide = read('(SELECT * FROM up_posts ORDER BY data DESC) up_posts',"WHERE tipo = 'post' AND status = '1' GROUP BY cat_pai ORDER BY data DESC LIMIT 4");

foreach($readSlide as $slide):
echo'<li>';
getThumb($slide['thumb'], $slide['tags'], $slide['titulo'], '866','254','','','#','t');
 echo'<div class="info">';
 echo'<p class="titulo"><a href="'.BASE.'/artigo/'.$slide['url'].'" title="ver mais de '.$slide['titulo'].'" >'.getCat($slide['cat_pai'],'nome').'-'.$slide['titulo'].'</a></p>';
 echo'<p class="resumo"><a href="'.BASE.'/artigo/'.$slide['url'].'" title="ver mais de '.$slide['titulo'].'" >'.lmWord($slide['content'],300).'</a></p>';
echo'</div><!-- /info -->';
 echo'</li>';
endforeach;
       ?>
pagina artigo.php
<?php 
$artigoUrl = mysql_real_escape_string($url[1]);
$readArtigo = read('up_posts',"WHERE url = '$artigoUrl'");
if(!$readArtigo){
    header('Location:'.BASE.'/404' );
}else
foreach($readArtigo as $art);
setViews($art['id']);
?>

<title><?php echo $art['titulo'].' | '.SITENAME;?></title>
<meta name="title" content="<?php echo $art['titulo'].' | '.SITENAME;?>" />
<meta name="description" content="<?php echo lmWord($art['content'],'100');?> " />
<meta name="keywords" content="PALAVRAS CHAVE DA PÁGINA" />
<meta name="author" content="AUTOR DO SITE" />   
<meta name="url" content="<?php echo BASE.'/artigo/'.$art['url'];?>" />  
<meta name="language" content="pt-br" /> 
<meta name="robots" content="INDEX,FOLLOW" /> 
</head>
<body>

<div id="site">
<?php setArq('tpl/header'); ?>

<div id="content">

<div class="single">
    <h1 class="pgtitulo"><?php echo $art['titulo'];?></h1>
      
    <div class="content">
<?php echo $art['titulo'];?>
    
<?php $readArtGb = read('up_posts',"WHERE post_id  = '$art[id]'");
   if($readArtGb){
      echo'<ul class="gallery">';
      foreach($readArtGb as $gb):
      echo'<li';
      if($gbnum%5==0) echo ' class="last"';
      echo'>';
      getThumb($gb['img'],$art['titulo'].' (imagem'.$gbnum.')', $art['titulo'], '98','60','','','#','t');
      echo'</li>';
     endforeach;
    echo' </ul><!-- //gallery -->';
       }
    ?>
    

        <div class="metadata">
    <?php 
        $autor = getAutor($art['autor']);
        $avatar = ($autor['avatar'] != '' ? BASE.'/tim.php?src='.BASE.'/uploads/avatars/'.$autor['avatar'].'&w=50&h=50&zc=1&q=100&a=t' : $autor['foto']);
        
    ?>
<img src="<?php echo $avatar;?>" width="50" title="<?php echo $autor['nome'];?>"alt="<?php echo $autor['nome'];?>">

 <span class="autor">Por:<strong><?php echo $autor['nome'];?></strong></span> 
<span class="data"><?php echo date('d/m/Y :i',strtotime($art['data']));?> </span>
 <span class="cat">em: <a href="<?php setHome();?>/categoria/<?php echo getCat($art['categoria'],'url' );?>"><?php echo getCat($art['categoria'],'nome');?></a></span>

 <span class="tags"><?php echo $autor['tags'];?></span>
<span class="views"><?php echo $autor['visitas'];?></span>
 </div><!-- /metadata -->
    
    </div><!-- // content -->
    
    <div class="sidebar">
        <?php setArq('tpl/sidebar'); ?>
    </div><!-- //sidebar -->
   </div><!-- /single -->
</div><!-- //content -->

Edited by naldo_10
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...