Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Fe_meneguette

[Resolvido] Erro PHP

Recommended Posts

Olá galera, estou com um problema no meu site que inves de aparecer a imagem do veiculos aparece o seguinte:

 

siteerro.jpg

 

 

O codigo é esse:

 

<table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
               <td width="360" valign="top">
                 <table width="354" align="center" >
                   <tr>
                     <td width="20" height="20">

                     <iframe src="foto_estoque_view.php?imagem=<?php if (($row_foto_unica['imagem'] <> '') and ((file_exists("galeriadefotos/peq/".$row_foto_unica['imagem'])))) { echo $row_foto_unica['imagem']; } else { echo "semimagem.gif"; } ?>" name="centro_topo" width="354" marginwidth="0" height="270" marginheight="0" scrolling="No" frameborder="0" id="centro_topo" leftmargin="0" topmargin="0"></iframe></td>
                   </tr>
                   </table>
                 <?php if ($totalRows_foto_unica > 1) { ?>
                 <table width="354" align="center" >
                   <tr>
                     <td height="20" align="left"><?php					
				$query_foto = "SELECT * FROM fotos WHERE id_estoque = $idestoque ORDER BY Id ASC";
				$foto = mysql_query($query_foto, $repasses) or die(mysql_error());
				$row_foto = mysql_fetch_assoc($foto);
				do {
				$imagem = $row_foto['imagem'];
				$caminho = "galeriadefotos/peq/$imagem";
				echo "<a href=\"foto_estoque_view.php?imagem=$imagem\" target=\"centro_topo\" class=\"img_link\">";
				echo "<img src=\"$caminho\" width=\"30\" height=\"23\" class=\"img2\"></a>";
				} while ($row_foto = mysql_fetch_assoc($foto));
				mysql_free_result($foto);
				?>                    </td>
                   </tr>
                   <tr>
                     <td height="20" align="left"><span class="cinza_10px">clique na foto para ampliar</span></td>
                   </tr>
                   <tr>

 

 

 

Abraços!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bem seu código esta um poko confuso mas... após algum tempo interpretando entendi...

 

parece q a variavel $row_foto_unica['imagem'] ta com o valor imagem...

eu acho....

mas n dá pra saber mto pq o q esta aparecendo pra você é um iframe

n entendi pq você n coloco a imagem ali e em vez disso colocou o iframe

 

aconselho a você comentar o código pra ficar mais entendivel

e o q tem dentro desse arquivo? foto_estoque_view.php

 

 

responde ai pra facilitar para agente q quer t ajudar :thumbsup:

Compartilhar este post


Link para o post
Compartilhar em outros sites

foto_estoque_view.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
text-align:center;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
-->
</style></head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center" valign="middle"><?
	$fotog = $_GET["imagem"];
	if (file_exists("galeriadefotos/grd/".$fotog)) {
		echo "<img src=\"galeriadefotos/grd/$fotog\" border=1>";
	}
	else
	{
	echo "<br><br><br>";
	echo "<div align=center><img src=\"galeriadefotos/peq/semimagem.gif\"></div>";
	}

  ?></td>
 </tr>
</table>
</body>
</html>

 

 

PS: O Codigo esta em php4, eu estou tendo diversos erros devido a isso...corrigi muita coisa apenas ultilizando o isset... não sei se pode ter alguma coisa a ver mas fica a dica

Compartilhar este post


Link para o post
Compartilhar em outros sites

rapaz d ante mão coloque o

<?php onde estaria <?

na abertura do arquivo

foto_estoque_view.php

em seguida tente ver a url q o iframe ta passando pra ele

através de exibir codigo font você acha isso e mostra para nós

 

mas acredito q o seu problema seja

mesmo o "<?php" q esta faltando...

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.