I have a directory which contains several files, many of which has non-english name. I am using PHP in Windows 7.
I want to list the filename and their content using
Do discover the files I have this script:
$content = scandir($directory);
$list = "\n";
This will succesfully find the file: 鶨鶖鵨鶣鎹鎣 I tried it here on a Linux distro though..
to read it you use: Line by line:
$lines = file('file.txt');
//loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {
print "Line #{$line_num} : " . htmlspecialchars($line) . "
\n";//or try it without the htmlspecialchars
}