Re[2]: [PHP-ES] error con include

From: Date: Sun, 20 Apr 2003 07:42:20 +0000
Subject: Re[2]: [PHP-ES] error con include
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general.es 
Request: Send a blank email to general-es+get-35306@lists.php.net to get a copy of this message
Estimado pedro, Con fecha sábado, 19 de abril de 2003, 22:26:52, escribió: p> Hola ... p> el problema es que uso la versión 4.0 entonces tengo que tomar la variable así ->> p> $id=$HTTP_GET_VARS['id']; Ten en cuenta que esa variable no es global, si la utilizas dentro de alguna función tienes que declararla como tal o pasarla como argumento. Saludos. p> gracias a todos p> ----- Original Message ----- p> From: "pedro" <pedro@formaship.com> p> To: <lista@phpes.com>; "Inversiones Ecos 2002 C.A - Caracas" p> <info@ecos.com.ve> p> Sent: Saturday, April 19, 2003 3:51 PM p> Subject: Re: [PHP-ES] error con include >> Gracias... pero no es eso. Yo logro mostrar la página con el este archivo. >> >> El problema es que $_GET no me está tomando la variable id. Por qué? >> >> Saludos Pedro >> >> ----- Original Message ----- >> From: "Inversiones Ecos 2002 C.A - Caracas" <info@ecos.com.ve> >> To: <lista@phpes.com> >> Sent: Saturday, April 19, 2003 3:17 PM >> Subject: Re: [PHP-ES] error con include >> >> >> > Hola >> > El archivo hoteles_home.inc tiene un error en la 5ta linea. >> > <TABLE width="#200" cellSpacing=0 cellPadding=0 >> > border="0"> >> > elimina el # y dejálo así: >> > <TABLE width="200" cellSpacing="0" >> > cellPadding="0" border="0"> >> > creo que debe ser eso... >> > Pesonalmente no me gustan usar las " (comillas) en php y por eso las >> cambio >> > por la ' (comilla simple o apóstrofe) >> > es que hay instrucciones que necesitan las comillas dobles (en php), y p> así >> > es más de localizar... >> > Espero que te sirva... >> > Un abrazo >> > Felipe >> > >> > >> > >> > ----- Original Message ----- >> > From: "pedro" <pedro@formaship.com> >> > To: <lista@phpes.com> >> > Sent: Saturday, April 19, 2003 2:33 PM >> > Subject: [PHP-ES] error con include >> > >> > >> > > Hola ... >> > > >> > > Quiero cambiar una parte de mi página según una selección, para eso >> > intento >> > > utilizar el include y ficheros .inc >> > > >> > > Pero siempre me muestra la página por defecto. Aquí les paso el p> código. >> > > >> > > Gracias >> > > >> > > ///fichero index.php >> > > >> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> >> > > <html> >> > > <head> >> > > <title>Cubatropicaltours</title> >> > > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">> >> > > <link rel="stylesheet" href="jscss/sty.css" >> > > type="text/css"> >> > > </head> >> > > <body marginwidth="0" marginheight="0" >> > > rightmargin="0" leftmargin="0" >> > > bottommargin="0" topmargin="0" height=550 width=800> >> > > <table width="100%" border="0" >> > > bgcolor="#00CCFF"> >> > > <tr> >> > > <td> >> > > <table width="100%" border="0"> >> > > <tr> >> > > <td align="left" valign="top"><img >> > > src="images/logoCubaTropical.gif"></td> >> > > <td align="left" valign="top"><img p> src="images/txtslogan.gif"></td> >> > > </tr> >> > > </table></td> >> > > <td width="360">&nbsp;</td> >> > > </tr> >> > > </table> >> > > <table width="100%" bgcolor="#33FF99" border="0" >> > > cellpadding="0" >> > > cellspacing="0" > >> > > <tr> >> > > <td width="80%"> >> > > </td> >> > > </tr> >> > > </table> >> > > >> > > <table width="100%" height="737" border="0" >> > > bgcolor="#FFFFCF"> >> > > <tr> >> > > <td width="20%" height="731"><table >> > > width="100%" height="725" >> > > border="0"> >> > > <tr> >> > > <td height="437">&nbsp;</td> >> > > </tr> >> > > </table></td> >> > > <td width="60%" align="center" >> > > valign="top"> >> > > <? >> > > switch ($_GET['id']) { >> > > case 1: >> > > include("hoteles_home.inc"); >> > > break; >> > > case 2: >> > > include("excur_home.inc"); >> > > break; >> > > case 3: >> > > include("prog_home.inc"); >> > > break; >> > > default: >> > > include("hoteles_home.inc"); >> > > >> > > // estado default .. nos determina el estado >> > > // "si no es ninguna opcion de las anteriores". >> > > } >> > > ?> >> > > </td> >> > > <td width="20%">&nbsp;</td> >> > > </tr> >> > > </table> >> > > </body> >> > > </html> >> > > >> > > ///fichero hoteles_home.inc >> > > <link rel="stylesheet" href="jscss/sty.css" >> > > type="text/css"> >> > > <Table cellpadding="0" cellspacing="0" >> > > width="100%"> >> > > <tr> >> > > <td> >> > > <TABLE width="#200" cellSpacing=0 cellPadding=0 >> > > border="0"> >> > > <TBODY> >> > > <TR> >> > > <TD><IMG src="images/tabs_active_left.gif" >> > > alt="" width=10 >> > > height=22 border=0></TD> >> > > <TD class=ActiveTab rowSpan=2><A >> > class=ActiveTab>Hoteles</A></TD> >> > > <TD><IMG height=22 alt="" >> > > src="images/tabs_active_right.gif" >> > > width=10 border=0></TD> >> > > >> > > <TD><IMG height=22 alt="" >> > > src="images/tabs_inact_left.gif" >> > > width=10 border=0></TD> >> > > <TD class=InactiveTab><A class=Tabs >> > > href="index.php?id=2">Excursiones</A></TD> >> > > <TD><IMG height=22 alt="" >> > > src="images/tabs_inact_right.gif" >> > > width=10 border=0></TD> >> > > >> > > <TD><IMG height=22 alt="" >> > > src="images/tabs_inact_left.gif" >> > > width=10 border=0></TD> >> > > <TD class=InactiveTab><A class=Tabs >> > > href="index.php?id=3">Programas</A></TD> >> > > <TD><IMG height=22 alt="" >> > > src="images/tabs_inact_right.gif" >> > > width=10 border=0></TD> >> > > </TR> >> > > </TBODY> >> > > </TABLE> >> > > <table> >> > > ..................... >> > > </table> >> > > </td> >> > > </tr> >> > > </Table> >> > > </form> >> > > >> > > >> > > >> > > --------------------------------------------------------------------- >> > > Archivo On-line: http://www.phpes.com/ >> > > via news: news://news.phpes.com/ >> > > Manual PHP en español: >> > > http://www.php.net/manual/es/ >> > > Para dar de baja la suscripción, mande un mensaje a: >> > > lista-unsubscribe@phpes.com >> > > >> > >> > >> > --------------------------------------------------------------------- >> > Archivo On-line: http://www.phpes.com/ >> > via news: news://news.phpes.com/ >> > Manual PHP en español: http://www.php.net/manual/es/ >> > Para dar de baja la suscripción, mande un mensaje a: >> > lista-unsubscribe@phpes.com >> > >> > >> >> >> >> --------------------------------------------------------------------- >> Archivo On-line: http://www.phpes.com/ >> via news: news://news.phpes.com/ >> Manual PHP en español: http://www.php.net/manual/es/ >> Para dar de baja la suscripción, mande un mensaje a: >> lista-unsubscribe@phpes.com >> >> p> --------------------------------------------------------------------- p> Archivo On-line: http://www.phpes.com/ p> via news: news://news.phpes.com/ p> Manual PHP en español: http://www.php.net/manual/es/ p> Para dar de baja la suscripción, mande un mensaje a: p> lista-unsubscribe@phpes.com -- Saludos, Fernando mailto:john_keats@terra.es

« previous php.general.es (#35306) next »