(PHP 4, PHP 5, PHP 7 < 7.4.0)
recode_file — 根據重新編碼請求,將檔案重新編碼
根據重新編碼 請求
,將檔案控制代碼 input
參考的檔案重新編碼到檔案控制代碼 output
參考的檔案中。
範例 #1 基本的 recode_file() 範例
<?php
$input = fopen('input.txt', 'r');
$output = fopen('output.txt', 'w');
recode_file("us..flat", $input, $output);
?>
此函式目前不處理參照遠端檔案(URL)的檔案控制代碼。兩個檔案控制代碼都必須參照本地檔案。