Код: Выделить всё
<?php
echo exec('cat file.log');
?>
Код: Выделить всё
<?php
echo exec('cat file.log');
?>
Код: Выделить всё
$fh = fopen('666.txt', "r") or die("Can't open file!");
$file = fread($fh, filesize($fh));
print $file;
fclose($fh);
я вижу так:levantuev писал(а): или последние три строки
Код: Выделить всё
<?php
$file_array = file("counter.txt");
?>
levantuev писал(а):Выводит только последнею строку файла file.log, как сделать что бы выводилось все содержимое или последние три строкиКод: Выделить всё
<?php echo exec('cat file.log'); ?>
Код: Выделить всё
<?php
exec('cat file.log', $output, $error);
print_r($output);
?>