Foros del Web » Programando para Internet » PHP »

Modular

Estas en el tema de Modular en el foro de PHP en Foros del Web. Tengo una serie de varios problemas hace rato deje mi web y cuando volvi a darle de nuevo presento algunos inconvenientes (antes estaba todo normal) ...
  #1 (permalink)  
Antiguo 20/04/2011, 09:23
Avatar de andres187  
Fecha de Ingreso: mayo-2010
Ubicación: Barranquilla
Mensajes: 39
Antigüedad: 13 años, 11 meses
Puntos: 0
Modular

Tengo una serie de varios problemas hace rato deje mi web y cuando volvi a darle de nuevo presento algunos inconvenientes (antes estaba todo normal) (eso si perdi la base de datos jejej)

me dicen estos errores
Cita:
Notice: Undefined variable: dbuser in C:\wamp\www\pipe\conf.php on line 27
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0015 395224 include( 'C:\wamp\www\pipe\conf.php' ) ..\index.php:22

( ! ) Notice: Undefined variable: dbpass in C:\wamp\www\pipe\conf.php on line 27
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0015 395224 include( 'C:\wamp\www\pipe\conf.php' ) ..\index.php:22

( ! ) Notice: Undefined variable: db in C:\wamp\www\pipe\conf.php on line 28
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0015 395224 include( 'C:\wamp\www\pipe\conf.php' ) ..\index.php:22

( ! ) Notice: Use of undefined constant webapp - assumed 'webapp' in C:\wamp\www\pipe\util.php on line 25
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0223 406848 include( 'C:\wamp\www\pipe\layouts\layout_otro.php' ) ..\index.php:64
3 0.0245 409968 include( 'C:\wamp\www\pipe\util.php' ) ..\layout_otro.php:20

( ! ) Notice: Undefined index: /pipe/?co=register in C:\wamp\www\pipe\layouts\layout_otro.php on line 32
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0223 406848 include( 'C:\wamp\www\pipe\layouts\layout_otro.php' ) ..\index.php:64

( ! ) Notice: Undefined index: delete in C:\wamp\www\pipe\layouts\layout_otro.php on line 54
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0223 406848 include( 'C:\wamp\www\pipe\layouts\layout_otro.php' ) ..\index.php:64
( ! ) Notice: Undefined Variable: Home In C:\Wamp\Www\Pipe\Includes\Menu.Php On Line 58
Call Stack
# Time Memory Function Location
1 0.0007 372264 {main}( ) ..\index.php:0
2 0.0223 406848 include( 'C:\wamp\www\pipe\layouts\layout_otro.php' ) ..\index.php:64
3 0.0544 444792 include( 'C:\wamp\www\pipe\includes\menu.php' ) ..\layout_otro.php:70

( ! ) Notice: Undefined variable: login in C:\wamp\www\pipe\includes\menu.php on line 64

No se que hacer. en una me dice que el problema esta en la linea 54:
<?php $delete = make_safe($_GET['delete']);
if($delete !== NULL){
$delete_contact = "delete from contacts where id='$delete'";
if (!mysql_query($delete_contact)){
die('Error: ' . mysql_error());
}
//header('Location: index.php');
//this doesn't work because header.php is included
//you can't have any html, etc data before header()'s
}
?>

esa es la linea pero ahora no se si php cambio algunas sentencias hace exactamente 8 meses que la habia dejado!

quisiera saber si el los codigos estan malos!
  #2 (permalink)  
Antiguo 20/04/2011, 09:27
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: Modular

podrias usar un isset() antes de tu funcion make_safe

Código PHP:
<?php 
if (isset($_GET['delete'])) { // validas que el dato exista antes de procesarlo
    
$delete make_safe($_GET['delete']);
    if(
$delete !== NULL){
    
// etc...
saludos.
  #3 (permalink)  
Antiguo 20/04/2011, 09:43
Avatar de andres187  
Fecha de Ingreso: mayo-2010
Ubicación: Barranquilla
Mensajes: 39
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: Modular

Cita:
Notice: Undefined index: /pipe/ in C:\wamp\www\pipe\layouts\layout_simple.php on line 33
Call Stack
# Time Memory Function Location
1 0.0007 371472 {main}( ) ..\index.php:0
2 0.0236 407312 include( 'C:\wamp\www\pipe\layouts\layout_simple.php' ) ..\index.php:64

Código PHP:
$url $_SERVER['REQUEST_URI'];
//the code below won't work if you aren't running this in the webapp folder
$pages = Array(
        
"/webapp/manage.php" => "- Manage Contacts",
        
"/webapp/account.php" => "- Account Settings",
        
"/webapp/login.php" => "- Login",
        
"/webapp/register.php" => "- Register"
);
$title $pages[$url]; 
no se si php cambio de sentencia php quisiera saber si esta malo disculpen las molestias

saludos
  #4 (permalink)  
Antiguo 20/04/2011, 10:26
Avatar de andres187  
Fecha de Ingreso: mayo-2010
Ubicación: Barranquilla
Mensajes: 39
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: Modular

Hidek1 me funciono pero ahora me da errores en mi funcion de make_safe me lo da solo cuando le doy en login!


ahora tengo otro problema de sentencia no me deja colocarlas asi:



Código PHP:
<li class="<?php echo $home?>"><a class="men" href="./">inicio</a></li>
                    <li><a class="men" href="?co=noticias">noticias</a></li>
                    <li><a class="men" href="?co=mangas">mangas CO</a></li>
                    <li><a class="men" href="?co=spoilers">spoilers CO</a></li>
                    <li><a class="men" href="?co=enviar">tus mangas CO</a></li>
                    <li><a class="men" href="?co=tuspoiler">tus spoilers CO</a></li>
<li class="<?php echo $login?>"><a class="men" href="?co=login" title="Login">Login</a></li>

el problema es

Código PHP:
<li class="<?php echo $home?>
y hace un tiempo no tenia problema
  #5 (permalink)  
Antiguo 20/04/2011, 10:52
Avatar de andres187  
Fecha de Ingreso: mayo-2010
Ubicación: Barranquilla
Mensajes: 39
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: Modular

encontre la solucion pero quisiera saber si es lo mismo

<?php echo $home; ?>

a

<?php=$home?>
  #6 (permalink)  
Antiguo 20/04/2011, 11:46
Avatar de rikardoz  
Fecha de Ingreso: abril-2011
Ubicación: En mi casa
Mensajes: 165
Antigüedad: 13 años
Puntos: 46
Busqueda Respuesta: Modular

Cita:
Iniciado por andres187 Ver Mensaje
encontre la solucion pero quisiera saber si es lo mismo

<?php echo $home; ?>

a

<?php=$home?>
si es lo mismo, tambien podrias hacer esto:
<?=$home;?>
<?=$_POST['home'];?> si lo lee mediante post o get cambiarlo por get
__________________
Agregadecer no cuesta nada O SI?

Etiquetas: modular
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 17:10.