File::write() -- writes bytes to a file
Note
This function can be called
statically.
Example
Example 38-1. Using File::write() <?php
require_once 'File.php';
$e = File::write('test.txt', 'this is a test line', FILE_MODE_WRITE);
if (PEAR::isError($e)) {
echo 'Could not write to file : ' . $e->getMessage();
} else {
echo "Successfully wrote to file test.txt\n";
}
?> |
|