previousFile::unlock() (Previous) (Next) File::writeChar()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

File::write()

File::write() – writes bytes to a file

Synopsis

require_once 'File.php';

mixed File::write ( string $filename , string $char , string $mode = FILE_MODE_APPEND , mixed $lock = false )

Description

Parameter

Return value

Throws

Note

This function can be called statically.

See

Example

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";
}
?>
previousFile::unlock() (Previous) (Next) File::writeChar()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.