Skip to content

Kirby 3.5.7.1

F::write()

Creates a new file

F::write(string $file, mixed $content, bool $append = false): bool

Parameters

Name Type Default Description
$file * string The path for the new file
$content * mixed Either a string, an object or an array. Arrays and objects will be serialized.
$append bool false true: append the content to an exisiting file if available. false: overwrite.

Return type

bool

Parent class

Kirby\Toolkit\F