<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Count File</title>
</head>
<body>
<p>Count File</p>
<p>Count File</p>
<p>Count File</p>
<p>Count File</p>
</body>
</html>
<?php
$file =basename($_SERVER['PHP_SELF']);
$no_of_lines =count(file($file));
echo $no_of_lines;
?>
Output:
Comments
Post a Comment