1. [代码] [PHP]代码 $myfile = fopen("test.txt", "r");while(!feof($myfile)) { $line_str = fgets($myfile); $str_arr = count_chars($line_str, 1); arsort($str_arr); print_r(chr(key($str_arr)).' is '.current($str_arr).PHP_EOL);}fclose($myfil
1. [代码][PHP]代码
$myfile = fopen("test.txt", "r"); while(!feof($myfile)) { $line_str = fgets($myfile); $str_arr = count_chars($line_str, 1); arsort($str_arr); print_r(chr(key($str_arr)).' is '.current($str_arr).PHP_EOL); } fclose($myfile);