I know little PHP, but even less MySQL, and my host doesn't allow remote database connections (for example, from Dreamweaver), so in addition to being confusing to me, database management is impractical. Is there any way to put a timestamp on an article automatically, without resorting to MySQL tables?

5 Years
Discussion Span
Last Post by Sogo7

If you're using flat files to store information, linux stores the creation date of the file and you can use that, but I assume that if you don't have access to a database you're not going to have access to the shell either.

Best suggestion would be for the first line of the article to be its date ;) Even better suggestion would be to find a new host.


There is a PHP class that gives you a virtual SQL database using flat files. see-> http://www.fsql.org/

Alternatively you could code something up yourself using fileatime & filetime.
// get file access/modification times
echo "Last accessed on: " . date("d-m-y", fileatime('myfile.html'));

echo "Last modified on: " . date("d-m-y", filemtime('myfile.html'));

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.