mixed File::writeChar (
string $filename
,
string $char
,
string $mode = FILE_MODE_APPEND
,
mixed $lock
= false
)
This function can be called statically.
Using File::writeChar()
<?php
require_once 'File.php';
$e = File::write('test.txt', 'a');
if (PEAR::isError($e)) {
echo 'Could not write to file : ' . $e->getMessage();
} else {
echo "Successfully wrote to file test.txt\n";
}
?>