我在下面的代码的帮助下阅读一个波斯语文本文件(使用PHP):
/* Reading the file name and the book (UTF-8) */
if(file_exists($SourceDirectoryFile))
{
$NameBook = "name.txt";
$AboutBook = "about.txt";
$myFile = "Computer-Technolgy/2 ($i)/".$NameBook;
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo 'Name file: '. $theData.'<hr/>';
}
Run Code Online (Sandbox Code Playgroud)
name.txt文件内容:
????? ???? ??? ????????? (LEARNING NETWORK)
Run Code Online (Sandbox Code Playgroud)
姓名档案: (学习网络)