1st - Edit your .htaccess file and in the end add the following code:
AddType application/x-httpd-lsphp .htm .html
And you ask why? Because in this way you can export an html in Blocs and tell Apache to read html to find php code as well and run it…
2nd - In any place you want the information just add a Code bric and insert this code:
<?php $filename = './index.html';
if (file_exists($filename)) {
echo "Last updated: " . date ("F d Y H:i:s.", filemtime($filename));
}
?>
Note: In this case I use ./index.html as I’m inserting this in the page index.html, for example if you want to add the stamp in the page contacts.html so you just change the code to ./contacts.html
This is extremely helpful. Thank you for the posting and explanation.
Since I am not a web programmer, perhaps you could say bit more about .htaccess file?
Where do I find it, etc…
So normally htaccess is a file you can find in the hosting, if you gave CPANEL you can go to File Manager -> public_html and select the option to show “Hidden Files” and you will find a file htaccess previewed with a dot, so like this: .htaccess
In linux probably you will find it in: /var/www/html
So normally is in the root where you have the files for the website.
So if you load your content by FTP you can see it if you enable the “Show hidden files” option.
If you are in linux, you have to enter in the folder where is the file, using terminal and use command “cd” and the name of consequent folders until you are in the same folder as the webpage, then you can use the command “nano .htaccess”.
If you use FTP just right click in the file and select open with “any code application you have or the text editor”
If you use windows, just right click and open file with text editor.
If for some reason you don’t find any .htacess file you can create one.
In linux when you use the command nano and there is nothing inside then in the end it will ask if you want to save the file, you say yes and it will create it automattically.
In XAMPP or Windows or whatever you just create a txt file, give it the name .htaccess and remove there termination (.txt).