Lasīt / rakstīt failus - CSS-triki

Anonim

Pievienot failam

function fileWrite($file, $message) ( fwrite(fopen($file, 'a'), $message . "\n"); )

Lasīt un parādīt visu failu

function fileRead($file)( $lines = file($file); foreach ($lines as $line_num => $line) ( echo $line, '
'; ) )