Foros del Web » Programando para Internet » PHP »

index.php?=loquesea

Estas en el tema de index.php?=loquesea en el foro de PHP en Foros del Web. stoy arto de ver paginas tipo index.php?condiciones, index.php?=loquesea soy novato en PHP y quisera que alguien me eplicara komo crear mis paginas de esa manera ...
  #1 (permalink)  
Antiguo 20/10/2007, 07:48
 
Fecha de Ingreso: octubre-2007
Mensajes: 3
Antigüedad: 16 años, 5 meses
Puntos: 0
index.php?=loquesea

stoy arto de ver paginas tipo index.php?condiciones, index.php?=loquesea

soy novato en PHP y quisera que alguien me eplicara komo crear mis paginas de esa manera en ves d miweb.com/loquesea.php

enormemente agradecido desde ya,
  #2 (permalink)  
Antiguo 20/10/2007, 08:00
 
Fecha de Ingreso: noviembre-2006
Mensajes: 102
Antigüedad: 17 años, 3 meses
Puntos: 0
Re: index.php?=loquesea

Pone esto en tu index.php
Código PHP:
<?php
$archivo
"1".$_GET['id'].".php";
if (
file_exists($archivo)) include($archivo); else  include("default.php");
?>
luegu en cada link o boton del menu de navegacion linkeas asi:
Código HTML:
index.php?id=somos
y luego haces cada archivo ejemplo quienes somos y lo guardas como 1somos.php despues la empresa y lo guardas como 1laempresa.php y asi. luego guardas el default.php en el que se va a cargar siempre por defecto en el index.php


index.php
Código PHP:
<html>
<head>
<META NAME="Title" CONTENT="A">
<META NAME="Author" CONTENT="">
<META NAME="Subject" CONTENT="Comercio">
<META NAME="Description" CONTENT="  ">
<META NAME="Keywords" CONTENT="">
<META NAME="Generator" CONTENT="dw mx">
<META NAME="Language" CONTENT="Spanish">
<META NAME="Revisit" CONTENT="1 day">
<META NAME="Distribution" CONTENT="Global">
<META NAME="Robots" CONTENT="All">
<title>Arnoldo A. Rinaldi e Hijos</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.estilo3 {
    border-top: 1px none #999999;
    border-right: 1px none #999999;
    border-bottom: 1px dotted #999999;
    border-left: 1px none #999999;
}
-->
</style>
<style>
body{
    margin:0;
    border:0 solid;
    width:100%;
    height:100%;
    padding:0;
    background-image: url();
    background-color: #B1B1B1;
}
</style>
<style>
a:link{ color: #0099CC;}
a:hover { color: #666666;}
</style>
<style type="text/css">
a:link {
    text-decoration: none;
    color: #FFFFFF;
}
a:visited {
    text-decoration: none;
    color: #FFFFFF;
}
a:active {
    text-decoration: none;
    color: #FFFFFF;
}
a:hover {
    text-decoration: none;
    color: #ff3300;
}
</style>
<STYLE TYPE="text/css">
<!--
TD {font-family:Verdana,sans-serif;font-size:11px} 
.Estilo1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Estilo4 {font-size: 10px}
a {
    font-size: 10px;
    color: #333333;
}
-->
</STYLE>
<style type="text/css">
.punteado{

  border-style: dashed;
   border-width: 1px;
   border-color: dddddd;
   background-color: ffffff;
   font-family: verdana, arial;
   font-size: 12pt;
}
</style> 
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table  width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <!--DWLayoutTable-->
  <tr>
    <td height="304" valign="top" bgcolor="#FFFFFF"><table width="780" height="626" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr >
        <td height="140" colspan="3" valign="top" bgcolor="#333333"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
      <tr>
        <td width="26"  valign="top" bgcolor="#E82F00"><!--DWLayoutEmptyCell-->&nbsp;</td>
        <td width="149" valign="top" bgcolor="#666666"><?php include('botonera.php'); ?></td>
        <td width="605" valign="top" bgcolor="#FFFFFF" class="punteado">          
        <?php
$archivo
"1".$_GET['id'].".php";
if (
file_exists($archivo)) include($archivo); else  include("default.php");
?></td>
        </tr>
    </table></td>
  </tr>
  <tr> 
    <td height="19" bgcolor="#333333"> <div align="right"></div></td>
  </tr>
</table>
</body>
</html>

botonera.php
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<
title>Documento sin t&iacute;tulo</title>
<
style type="text/css">
a:link {
    
text-decorationnone;
    
color#FFFFFF;
}
a:visited {
    
text-decorationnone;
    
color#FFFFFF;
}
a:active {
    
text-decorationnone;
    
color#FFFFFF;
}
a:hover {
    
text-decorationnone;
    
color#ff3300;
}
</
style>
</
head>

<
body>
<
table width="149" height="202" border="0" cellpadding="4" cellspacing="0">
  <
tr>
    <
td width="156"><a href="index.php?id=inicio"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"HOME </a></td>
  </
tr>
  <
tr>
    <
td><a href="index.php?id=somos"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"QUIENES SOMOS </a></td>
  </
tr>
  <
tr>
    <
td><a href="index.php?id=representaciones"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"REPRESENTACIONES</a></td>
  </
tr>
  <
tr>
    <
td height="24"><a href="index.php?id=codigo"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"LISTAS DE PRECIO </a></td>
  </
tr>
  <
tr>
    <
td><a href="index.php?id=donde"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"DONDE ESTAMOS </a></td>
  </
tr>
  <
tr>
    <
td><a href="index.php?id=pedido"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"></a> <a href="index.php?id=pedido">ENVIAR PEDIDO </a></td>
  </
tr>
  <
tr>
    <
td><a href="index.php?id=contacto"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"CONTACTO</a></td>
  </
tr>
  <
tr>
    <
td><a href="http://www.r.com.ar/webmail"><img src="a.gif" width="8" height="8" border="0" align="absmiddle"//webmail </a></td>
  
</tr>
  <
tr>
    <
td>&nbsp;</td>
  </
tr>
</
table>
</
body>
</
html

fijate este videotutorial http://www.phpcondreamweaver.com.ar/video-tutoriales
http://www.phpcondreamweaver.com.ar/...12/pycinternet




espero te sirva
  #3 (permalink)  
Antiguo 20/10/2007, 12:42
 
Fecha de Ingreso: octubre-2007
Mensajes: 3
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: index.php?=loquesea

Nte todo gracias pero n m va vien. Resulta que me lleva a la pgina deseada pro ala ves que m lleva a la pagina deseada abajo me sale de nuevo todo el diseño de la pagina index.php

para que me entendais ejemplo me voy a la pagina condiciones y debajo de esta tb me sale la pagina index con su logo,menu...

que puede pasar?
  #4 (permalink)  
Antiguo 20/10/2007, 12:47
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 1 mes
Puntos: 772
Re: index.php?=loquesea

Hola skual. Bienvenido al foro.

¿Tienes algún problema con el teclado? Te comes muchas letras

Ortografía en FDW

Saludos,
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 06:17.