RE: [PHP-ES] Como paso una variable

From: Date: Mon, 16 Oct 2000 16:49:15 +0000
Subject: RE: [PHP-ES] Como paso una variable
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-2422@lists.php.net to get a copy of this message
Te falta una línea que lea las variables que pasas por GET, que no son leídas directamente, sino colocadas en un array de nombre $HTTP_GET_VARS. El archivo quedaría como sigue: // despliega.php <html> <body> <? $noticia=$HTTP_GET_VARS['noticia']; require ($noticia); ?> </body> </html> Un saludo, Jose Benigno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ José Benigno Freire Pablo Aranda 16 28006 Madrid Tel: 91 5615441 jbfreire@edunet.es -----Mensaje original----- De: StR [mailto:str@strgt.com] Enviado el: lunes, 16 de octubre de 2000 7:50 Para: lista@phpes.com Asunto: [PHP-ES] Como paso una variable Bueno, vamos a ver si me explico bien. Tengo varios archivos (noticia0.txt, noticia1.txt, noticia2.txt .....) y tengo un archivo despliega.php, y tego otro que es el index.php Ahora como le mando la variable &noticia a despliega.php? Porque leí en el manual que esto no funcionaría // index.php <html> <body> <a href = "despliega.php?noticia=noticia0.txt"> Noticia # 0 </a> <a href = "despliega.php?noticia=noticia1.txt"> Noticia # 1 </a> <a href = "despliega.php?noticia=noticia2.txt"> Noticia # 2 </a> </body> </html> // despliega.php <html> <body> <? require ($noticia); ?> </body> </html> Los archivos estan de esta forma. Si pueden ayudarme, se los agradecería mucho. Gracias de Antemano StR

Attachment: [text/x-vcard] José Benigno Freire Salinas.vcf
« previous php.general.es (#2422) next »