Example: last-modified header.


In some cases, the web server is required to issue an HTTP header Last-Modified. For example, when registering your resource on Yandex, the error "Incorrect dates" occurs. For static documents, the server will always output the last-modified value. This is valid for html files. For SSI, the server will issue the last-modified value if the "XBitHack full" directive is prescribed (just write this line in .htaccess), and the "executable" attribute for the group is set for the file being accessed. In scripts, last-modified is issued by other means. For example, if we take into account that the php script generates code dynamically, then the most logical thing would be to give the current date and time as last-modified./>


This is implemented as follows:


("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); ?>

Attention: the header command must be executed in a php script before the script starts issuing html text to the user's browser.