Ho trovato questo codice in php che va vedere perfettamente i file contenuti nella cartella. sarebbe interessante selezionane il file e mandarlo su:codice:<?php $path = "dati/"; //change this if the script is in a different dir that the files you want $show = array( '.csv', '.html' ); //Type of files to show $select = "<select name=\"content\" id=\"content\">"; $dh = @opendir( $path ); while( false !== ( $file = readdir( $dh ) ) ){ $ext=substr($file,-4,4); if(in_array( $ext, $show )){ $select .= "<option value='$path/$file'>$file</option>\n"; } } $select .= "</select>"; closedir( $dh ); echo "$select"; ?>
$.get("FILE.csv", function(csvString) {
in modo che google chart richiede prima il file e poi elebora il grafico.
saluti

Rispondi quotando