$fp = fopen("counter.txt", "r+"); $counter = fgets($fp, 80); $counter = doubleval($counter) + 1; fseek($fp, 0); fputs($fp, $counter); $n = strlen("$counter"); for ($i=0; $i<$n; $i++) { $gra_counter = substr($counter, $i, 1); //抓取每一個字元 // 將每一個抓取的字元對應為 GIF 檔 $image = $image . ""; } fclose($fp); ?>
echo $image; ?>