Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/12/2011, 06:11
Avatar de JaimeMSE
JaimeMSE
 
Fecha de Ingreso: diciembre-2010
Ubicación: Isla Cristina (Huelva)
Mensajes: 164
Antigüedad: 13 años, 4 meses
Puntos: 7
Respuesta: Mostrar páginas individuales en un mismo archivo

Cita:
Iniciado por charlyalegret Ver Mensaje
Si usas en cualquier url una barra inicial, por decir algo /header.php o /imagenes/esta, siempre te referirás a la carpeta raiz, así evitarás posibles problemas y te servirá tanto para en local como en el servidor.

saludos
Ahora mismo tengo en el archivo CARPETABASE/usuarios/login.php

Código PHP:
<?php include('/header.php'); ?>
<?php 
include('/lateral.php'); ?>
<?php 
require('/config.php'); ?>
Y me aparece:

Código PHP:
Warning: include(/header.php) [function.include]: failed to open streamNo such file or directory in C:xampphtdocsproteusuarioslogin.php on line 1

Warning
: include() [function.include]: Failed opening '/header.php' for inclusion (include_path='.;C:\xampp\php\PEAR'in C:xampphtdocsproteusuarioslogin.php on line 1

Warning
: include(/lateral.php) [function.include]: failed to open streamNo such file or directory in C:xampphtdocsproteusuarioslogin.php on line 2

Warning
: include() [function.include]: Failed opening '/lateral.php' for inclusion (include_path='.;C:\xampp\php\PEAR'in C:xampphtdocsproteusuarioslogin.php on line 2

Deprecated
Assigning the return value of new by reference is deprecated in C:xamppphpPEARConfig.php on line 80

Deprecated
Assigning the return value of new by reference is deprecated in C:xamppphpPEARConfig.php on line 166 
También he probado con include('../header.php'); y nada.
__________________
@JaimeMSE - ¡Sígueme!