alvaroxz Posted September 7, 2008 Report Share Posted September 7, 2008 (edited) este es un contador con imagenes, sin necesidad de base de datos MySql :D es super sencillo Paso 1: coloca este codigo donde quieras que valla el contador: <?php $contador = "a.txt"; $abrir = fopen($contador, "r"); $leer = fread($abrir,filesize($contador)); $agregar = $leer+1; $borrar = fopen($contador, "w+"); $esribir = fwrite($borrar, $agregar); for($i == 0; $i < strlen($leer); $i++) { $numero = substr($leer,$i,1); echo "<img src=numeros/$numero.gif>"; } fclose($abrir); fclose($borrar); ?> Paso 2: En donde dejaste ese codigo tienes que crear una carpeta que se llame numeros y copias estos numeros con su nombre ejemplo guardar el 1 como 1.gif el 7 como 7.gif y asi... en la carpeta numeros y listo Edited September 7, 2008 by alvaroxz Link to comment Share on other sites More sharing options...
chxrry1 Posted October 7, 2008 Report Share Posted October 7, 2008 wena me sirvio Link to comment Share on other sites More sharing options...
alvaroxz Posted October 7, 2008 Author Report Share Posted October 7, 2008 ahora lo que pueden editar es cambiar las imagenes de los numeros, por los que uds deseen. Link to comment Share on other sites More sharing options...
lesbian Posted January 28, 2009 Report Share Posted January 28, 2009 vamos a probar vale cumpita Link to comment Share on other sites More sharing options...
zenit_and Posted January 28, 2009 Report Share Posted January 28, 2009 escelente :) Link to comment Share on other sites More sharing options...
lesbian Posted January 29, 2009 Report Share Posted January 29, 2009 uta no me resulta bro Link to comment Share on other sites More sharing options...
alvaroxz Posted January 29, 2009 Author Report Share Posted January 29, 2009 reviza bien Link to comment Share on other sites More sharing options...
kirby_007 Posted January 29, 2009 Report Share Posted January 29, 2009 Mira yo entiendo hasta el paso uno y no paso del paso uno jajajaja mira mi pregunta es eso lo pongo en un block de notas o va siempre el front page???? y queria ver si me podes explicar un poco mas o hacer dibujitos!! gracias por responder Link to comment Share on other sites More sharing options...
keldon Posted February 25, 2009 Report Share Posted February 25, 2009 compadre no funko me salen esto Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/colegios/public_html/numeros/contador.php on line 5 Warning: fopen(contador.txt) [function.fopen]: failed to open stream: Permission denied in /home/colegios/public_html/numeros/contador.php on line 7 Warning: fwrite(): supplied argument is not a valid stream resource in /home/colegios/public_html/numeros/contador.php on line 8 Warning: fclose(): supplied argument is not a valid stream resource in /home/colegios/public_html/numeros/contador.php on line 17 Link to comment Share on other sites More sharing options...
MapiZ Posted March 3, 2009 Report Share Posted March 3, 2009 lo unico fome esq al apretar f5 se va llenando el contador... io creo q faltaria algo con cookies para q identifiq al visitante :P se le agradece !!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now