Foros del Web » Programando para Internet » PHP »

Respuesta extrania

Estas en el tema de Respuesta extrania en el foro de PHP en Foros del Web. alguien sabe porque el servidor me responde con esto: Código: HTTP/1.1 200 OK Date: Fri, 11 Aug 2006 16:51:48 GMT Server: Apache/1.3.33 (Darwin) PHP/4.4.1 X-Powered-By: ...
  #1 (permalink)  
Antiguo 11/08/2006, 11:20
Avatar de stock  
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 9 meses
Puntos: 53
Pregunta Respuesta extrania

alguien sabe porque el servidor me responde con esto:

Código:
HTTP/1.1 200 OK
Date: Fri, 11 Aug 2006 16:51:48 GMT
Server: Apache/1.3.33 (Darwin) PHP/4.4.1
X-Powered-By: PHP/4.4.1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=96
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

ddf
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
	
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ColorOne - Portal Administrativo</title>
<script language="JavaScript" type="text/javascript" src="../common/javascript/prototype.js"></script>

<link href="../common/css/admin.css" rel="Stylesheet" type="text/css" />

<!--[if gte IE 5.5]><![if lt IE 7]>
<style type="text/css">
#menu{
	width:210px;
}
#contenido{
	margin-right:5px;
	height:expression(this.scrollHeight > 650 ? "auto":"650px");
}
</style>
<![endif]><![endif]-->

</head>
<body>

<div id="central">

<div id="superior"></div>

<div id="menu">
<ul>
	<li><a href="servletAction.php?mod=main">Inicio</a></li>
	<li><a href="servletAction.php?mod=producto">Catalogo de Productos</a></li>
	<li><a href="servletAction.php?mod=about">Quienes somos?</a></li>
	<li><a href="servletAction.php?mod=caso">Estudio de casos</a></li>	
	<li><a href="servletAction.php?mod=servicio">Servicios</a></li>
	<li><a href="servletAction.php?mod=texto">Contactanos</a></li>	
	<li><a href="servletAction.php?mod=salir">Salir</a></li>
</ul>
</div>

<div id="contenido">

<div id="mainContenedor">
<h1>Quienes somos</h1>
<h2></h2>

<form action="servletAction.php?mod=about&method=save" enctype="multipart/form-data" method="post">
<input type="hidden" name="idAbout" value="1"  />
<table>
	<caption>Edit Quienes somos</caption>
	<thead>
	</thead>
	<tfoot>
		<tr>
			<td><input class="boton" type="submit" value="save" /></td>
		</tr>
	</tfoot>
	<tbody>
		<tr>
			<td><label>Objetivo</label></td>
		</tr>
		<tr>
			<td><textarea class="campo" name="objetivo" id="objetivo" rows="20">Options, and in the background section (at the bottom of the dialog) choose Picture. Click on the select button and the standard Open dialog will appear in which you can choose the image you’d like to appear as the background of your window. Click OK and that image will appear. Note: This works only when viewing the window in icon view. if you change to list view, the image will no longer be visible.</textarea></td>
		</tr>
		<tr>
			<td><label>Misión</label></td>
		</tr>
		<tr>
			<td><textarea class="campo" name="mision" id="mision" rows="20">Options, and in the background section (at the bottom of the dialog) choose Picture. Click on the select button and the standard Open dialog will appear in which you can choose the image you’d like to appear as the background of your window. Click OK and that image will appear. Note: This works only when viewing the window in icon view. if you change to list view, the image will no longer be visible.</textarea></td>
		</tr>
		<tr>
			<td><label>Visión</label></td>
		</tr>
		<tr>
			<td><textarea class="campo" name="vision" id="vision" rows="20">As long as your Finder window is in icon view, you can add a photo as its background. You do this by going under the View menu, under show View Options, and in the background section (at the bottom of the dialog) choose Picture. Click on the select button and the standard Open dialog will appear in which you can choose the image you’d like to appear as the background of your window. Click OK and that image will appear. Note: This works only when viewing the window in icon view. if you change to list view, the image will no longer be visible.</textarea></td>
		</tr>
		
	</tbody>
</table>
</form>
</div>

</div>

<div id="footer">
</div>

</div>

</body>
</html>


0
en lugar de mostrarme la pagina, el explorador me muestra el texto ese que les puse arriba, alguien tiene alguna idea porque??

ok, esto lo hace justo despues de que visualizo una imagen que extraigo de mi base de datos, la cual extraigo asi:

Código:
if(isset($_GET['id'])) {

    include "../util/conecta.php";
	include "../util/seguridad.php";

    $sql = "SELECT imagen,imagen_type,imagen_peso FROM productos WHERE id_producto='".$_GET['id']."'";

    $rs = mysql_query($sql,$conn);

    $datos = mysql_result($rs,0,"imagen");
	$type = mysql_result($rs,0,"imagen_type");
	$peso = mysql_result($rs,0,"imagen_peso");



    header("Content-type: $type");
    header("Content-length: $peso"); 
    header("Content-Disposition: inline; filename=$nombre"); 
 
   echo $datos;
}
y en mi pagina hago esto:

<a href="getPicture.php?id=20">

la imagen me la muestra bien, pero despues de verla, al dar click sobre cualquier enlace aparece algo como lo que mostre arriba
  #2 (permalink)  
Antiguo 11/08/2006, 16:52
Avatar de stock  
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 9 meses
Puntos: 53
a nadie le ha pasado algo semejante??
  #3 (permalink)  
Antiguo 14/08/2006, 07:54
Avatar de stock  
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 9 meses
Puntos: 53
se que es algo muy extranio, pero estoy seguro de que al menos a alguien le paso!!
  #4 (permalink)  
Antiguo 14/08/2006, 17:20
Avatar de stock  
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 9 meses
Puntos: 53
mmmmmmmmmm
  #5 (permalink)  
Antiguo 14/08/2006, 17:56
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Expón el código que usas completo (no sólo la "respuesta que obtienes"). Si tu navegador está mostrandote el código HTML y cabeceras HTTP .. algùn problema tienes en la definición de cabeceras. De hecho en tu código (que no se aprecia y es dificil aventurarse a decir que ese es el problema) .. "parece" que estás componiendo cabeceras HTTP para la entrega de la imagen .. en el mismo código HTML que lo llama? ...

No se vé claramente si el código que obtiene tu imagen en binario de tu BBDD previa consulta SQL queda en un script -aparte- del còdigo HTML que lo llamas (el tag de imagen) .. Es primordial que estén separados.

Para que veas de lo que hablo .. toma nota y estudia este tutorial al respecto:
http://www.forosdelweb.com/f18/tutorial-ejemplo-subir-archivos-bd-guardando-bd-binario-127775/
(parece que te basastes en el mismo?)

Un saludo,
__________________
Por motivos personales ya no puedo estar con Uds. Fue grato haber compartido todos estos años. Igualmente los seguiré leyendo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:38.