NECESITO AYUDA URGENTE!!!
| From: | Centro Municipal de Información de Ciencias Médicas | Date: | Mon, 08 Sep 2003 19:00:55 +0000 |
| Subject: | NECESITO AYUDA URGENTE!!! | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-40192@lists.php.net to get a copy of this message | ||
Hola lista, necesito una mano urgente en un script que estoy realizando ya que corro el riesgo de
que mi cerebro se desintegre. El asunto es el siguiente:
Estoy realizando un pequeño albun de fotos personal, este es el código que estoy usando:
<html>
<head>
<meta http-equiv="Content-Language" content="es">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Fotos</title>
</head>
<body>
<p>Fotos</p>
<hr>
<?
{
if (isset($foto))
{
switch($foto)
{
case 0:
echo makeHTML(0,0,1);
break;
case 1:
echo makeHTML(1,0,2);
break;
....
makeHTML es una función que me permite recuperar las fotos, que dicho sea de paso las estoy
guardando en una carpeta, no estoy usando nada de mySQL para esto, el código de esta función es el
que sigue:
function MakeHTML($number,$previous,$next)
{
$strHTML="<table align=\"center\" border=\"1\"
cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:
collapse\" bordercolor=\"#111111\" width=\"30%\">";
$strHTML.="<tr><p>";
$strHTML.="<td width=\"100%\">";
$strHTML.="<img border=\"0\"
src=%22images/Fiesta_RMs/foto%22.$number.%22.JPG/%22 width=\"271\"
height=\"207\"></td>";
$strHTML.="</tr>";
$strHTML.="</table>";
$strHTML.="<hr>";
$strHTML.="<table border=\"0\" cellpadding=\"0\"
cellspacing=\"0\" width=\"100%\">";
$strHTML.="<tr>";
$strHTML.="<td width=\"14%\">";
if ($previous==0)
{
if ($number==0)
{
$strHTML.="<p align=\"center\">Anterior</td>";
$strHTML.="<td width=\"73%\"> </td>";
$strHTML.="<td width=\"13%\">";
$strHTML.="<p align=\"center\"><a href=".<? echo
$SERVER[PHP_SELF]?>."?foto=".$next.">Próxima</a></td>";
$strHTML.="</tr>";
$strHTML.="</table>";
}
else
{
$strHTML.="<a href=".<? echo
$SERVER['PHP_SELF']?>."?foto=1>Anterior</td>";
$strHTML.="<td width=\"73%\"> </td>";
$strHTML.="<td width=\"13%\">";
$strHTML.="<p align=\"center\"><a href=".<? echo
$SERVER[PHP_SELF]?>."?foto=".$next.">Próxima</a></td>";
$strHTML.="</tr>";
$strHTML.="</table>";
}
}
else
{
$strHTML.="<p align=\"center\">";
$strHTML.="<a href=".<? echo
$SERVER['PHP_SELF']?>."?foto=".$previous.">Anterior</td>";
$strHTML.="<td width=\"73%\"> </td>";
$strHTML.="<td width=\"13%\">";
$strHTML.="<p align=\"center\"><a href=".<? echo
$SERVER['PHP_SELF']?>."?foto=".$next.">Próxima</a></td>";
$strHTML.="</tr>";
$strHTML.="</table>";
}
}
return($strHTML)
el problema que tengo es al llamar a esa función desde mi script, puse un include
('funcion.php') pero me pone el código en el script y por supuesto me lo saca por el
browser cosa que no "debía" pasar, si lo pongo en una parte de mi script fuera de toda
posibilidad de interpretación entonces el script me devuelve la ventana en blanco, ni siquiera me
pone "Fotos"
¿Que me estará pasando, como puedo solucionar esto?. Opté por realizar el albun yo mismo ya que
nada de lo que busqué en Zend.com me convino.
Esperando de vuestra ayuda
Paradix ;)