PHP.nl

recode_file

recode_file

Recode from file to file according to recode request

bool **recode_file** string $request resource $input resource $output

Recode the file referenced by file handle into the file referenced by file handle according to the recode . input``output``request

requestThe desired recode request type

input A local file handle for the resource``input

output A local file handle for the resource``output

Returns false, if unable to comply, true otherwise.

Voorbeeld: Basic example

<?php
$input = fopen('input.txt', 'r');
$output = fopen('output.txt', 'w');
recode_file("us..flat", $input, $output);
?>

This function does not currently process file handles referencing remote files (URLs). Both file handles must refer to local files.

fopen