以下のコードを使用して、1 つのペルシャ語のテキスト ファイルを (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/>';
}
name.txt ファイルの内容:
آموزش شبكه هاي کامپيوتري (LEARNING NETWORK)
ファイル名: ����� ���� ��� ���������� (LEARNING NETWORK)