Foro de elhacker.net

Programación => PHP => Mensaje iniciado por: jdc en 17 Agosto 2009, 01:18 am



Título: Pedido: Sistema simple de noticias en php
Publicado por: jdc en 17 Agosto 2009, 01:18 am
Alguien contara con algun ejemplo de noticias en php funcionando?

http://www.gs-zone.com.ar/ft14730_sistema_de_noticias_php.html

Probe ese pero no lo pude hacer funcionar, en localhost me tira muchisimos errores

Código:
Notice: Use of undefined constant ’db - assumed '’db' in C:\wamp\www\NOTICIAS\index.php on line 7

Notice: Use of undefined constant cnx - assumed 'cnx' in C:\wamp\www\NOTICIAS\index.php on line 7

Notice: Use of undefined constant php’ - assumed 'php’' in C:\wamp\www\NOTICIAS\index.php on line 7

Warning: include(0php’) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\NOTICIAS\index.php on line 7

Warning: include() [function.include]: Failed opening '0php’' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\NOTICIAS\index.php on line 7


Notice: Use of undefined constant ’list - assumed '’list' in C:\wamp\www\NOTICIAS\index.php on line 9

Notice: Use of undefined constant categoria - assumed 'categoria' in C:\wamp\www\NOTICIAS\index.php on line 9

Notice: Use of undefined constant php’ - assumed 'php’' in C:\wamp\www\NOTICIAS\index.php on line 9

Warning: include(0php’) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\NOTICIAS\index.php on line 9

Warning: include() [function.include]: Failed opening '0php’' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\NOTICIAS\index.php on line 9


Notice: Use of undefined constant ’list - assumed '’list' in C:\wamp\www\NOTICIAS\index.php on line 12

Notice: Use of undefined constant noticia - assumed 'noticia' in C:\wamp\www\NOTICIAS\index.php on line 12

Notice: Use of undefined constant php’ - assumed 'php’' in C:\wamp\www\NOTICIAS\index.php on line 12

Warning: include(0php’) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\NOTICIAS\index.php on line 12

Warning: include() [function.include]: Failed opening '0php’' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\NOTICIAS\index.php on line 12

Revise y nada, no deberia tirar errores segun yo pero los tira xDDD revise el index.php y sigue, me podrian ayudar? quiero aprender pero no me sale, se que es patudo de mi parte pedir algo echo pero solo es para aprender y entender como diablos se conecta la db con php, tal vez sea error de configuracion del wamp y por ello les pregunto a ustedes.

Si tienen algun ejemplo funcionando pues bienvenido sea :)

Gracias de antemano. Saludos


Título: Re: Pedido: Sistema simple de noticias en php
Publicado por: [u]nsigned en 17 Agosto 2009, 01:36 am
Código:
Warning: include(0php’) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\NOTICIAS\index.php on line 7

0php debería ser .php ... :rolleyes:

Saludos

Edito:

0php debería ser 'php' ... creo que es un error de tipeo  ;D


Título: Re: Pedido: Sistema simple de noticias en php
Publicado por: jdc en 17 Agosto 2009, 02:37 am
fue lo primero que lei :D

Código
  1. <html>
  2. <head>
  3. <title>Sistema de Noticias - By RogerTM</title>
  4. </head>
  5. <body>
  6. <h1>Sistema de Noticias - By RogerTM</h1>
  7. <?php include(&#8217;db-cnx.php&#8217;); ?>
  8. <div style=&#8221;float:left; width: 25%;&#8221;>
  9. <?php include(&#8217;list-categoria.php&#8217;); ?>
  10. </div>
  11. <div style=&#8221;float:right; width: 75%;&#8221;>
  12. <?php include(&#8217;list-noticia.php&#8217;); ?>
  13. </div>
  14. </body>
  15. </html>

Linea 7:

<?php include(’db-cnx.php’); ?>

Ya revise los errores pero nada :) por cierto no lo he cambiado lo posteo tal cual como estan los archivos


Título: Re: Pedido: Sistema simple de noticias en php
Publicado por: Dosjota en 17 Agosto 2009, 06:51 am
sera la conexion a la base de datos... :silbar:

la configurastes??


Título: Re: Pedido: Sistema simple de noticias en php
Publicado por: jdc en 17 Agosto 2009, 08:09 am
También... Servidor: localhost, user: root, pass: vacío xD
 
Alguien más lo podría probar? Por lo menos para saber sí el error es mío, de mi pc o del script?