Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title>Word Permutations</title>
- <style type="text/css">
- .u {
- text-decoration: underline;
- }
- </style>
- </head>
- <body>
- <?php
- $date = date('l jS \of F Y h:i:s A');
- print "<p>It is currently:</p>";
- print "<p id='date'>" . $date . "</p>";
- $filename = "file.txt";
- $file = fopen($filename, "a+");
- fwrite($file, $date); // add the current date on top
- fclose($file);
- $file_array = file($filename); // get the log file as array
- $length = count($file_array);
- print "<p>This site last visited on: " . $file_array[0] . "</p>";
- print "<p>This site visited " . $length . " times.</p>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement