.dsy:it.
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- Elenco elementi (http://www.dsy.it/forum/showthread.php?threadid=15707)


Posted by publi on 02-12-2004 18:42:

Elenco elementi

Come si fanno a creare quelle pagine html che elencano gli elementi che contengono?
Avete presente, tipo quando si guarda nel browser il proprio localhost?

__________________
Acchiappasogni


Posted by mayetta on 02-12-2004 18:56:

prova a vedere se intendi questo


Posted by publi on 02-12-2004 19:14:

Si, ma quella che intendo io è molto piu semplice, serve solo a me e mi pare sia senza utilizzare js...

__________________
Acchiappasogni


Posted by yeah on 02-12-2004 20:07:

Puoi usare Php.

Così a mente direi:
1) apri la cartella con opendir()
2) un bel while() con readdir() che restituisce il prossimo elemento della cartella o FALSE quanto ha finito
3) visualizzi l'elemento con echo() o altre sofisticazioni
4) chiudi la cartella con closedir()

Php

Tutto in solo html (standard) non è possibile.

__________________
?


Posted by publi on 02-12-2004 20:39:

Si si php, ma tu che hai scritto???

__________________
Acchiappasogni


Posted by yeah on 02-12-2004 22:47:

Solo la sequenza a grandi linee delle funzioni da chiamare.

Ecco come ho fatto io:

code:
$dir_handle = opendir(getcwd()); while( false !== ($file = readdir($dir_handle)) ) if( ($file != ".") && ($file != "..") ) echo $file."<br>"; closedir($dir_handle);

__________________
?


All times are GMT. The time now is 19:19.
Show all 6 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.