diff --git a/index.php b/index.php index d8286d3..0b6c217 100644 --- a/index.php +++ b/index.php @@ -109,8 +109,12 @@ { $content = file_get_contents($dir . '/' . $title); } + + $lines = substr_count($content, "\r\n"); + $words = substr_count($content, " ") + $lines; + $chars = strlen($content); - $rows = max(20, substr_count($content, "\r\n")) * 2; + $rows = max(20, $lines) * 2; require('note.php'); diff --git a/note.php b/note.php index f67e51d..bf47fa3 100644 --- a/note.php +++ b/note.php @@ -4,6 +4,9 @@ + lines + words + chars