You need to be logged in to post in the forums. If you do not have an account, please sign up first.
document.lastModified in PHP
In one of my PHPs I use following code:[PHP]
<?php
$myfooter = "<font size=\"1\"><script language=\"JavaScript\" type=\"text/javascript\">
</script></font>";
print $myfooter;
?> [/PHP]
To which file does this document.lastModified belong to?
Because as a result in Opera and Netscape I alsways get:
Last Modified January 1, 1970 GMT 16428 Views since 09/24/2003 Test: [url]http://www.econ.jku.at/test3.php[/url]
And the date displayed in NS and OP is defenitely wrong.
whereas in IE I get (which is the current date and time):
Last Modified 11/24/2003 13:50:27 16428 Views since 09/24/2003 Test: [url]http://www.econ.jku.at/test3.php[/url]
Why do NS and OP always return January 1, 1970 GMT?
mh
January 1, 1970 GMT is the date all JavaScripts and similar things start counting from (most of them in milliseconds). And because you can't modify a PHP file like you modify HTML files the script gives a invalid answer (=1.1.1970).
To insert a working last modified date you should use PHP commands
To insert a working last modified date you should use PHP commands
Try this:
[php]<?php echo "Last modified: " . date("F d Y H:i:s.", getlastmod()); ?>[/php]
[php]<?php echo "Last modified: " . date("F d Y H:i:s.", getlastmod()); ?>[/php]
The Opera WIKI, including tips, custom buttons & performance tweaks for Opera. Custom Setups for Web Developers & power users with ƃiƤølař ƌisøřƌeř! RSS feed to keep up-to-date with the wiki.
Tools: Button/Command creator ¤ GZip Discrimination Tester ¤ INI Difference Tool
Wishes: Advanced Page Management ¤ Sticky Searches (mock-up) ¤ Better Find Interface ¤Oh, and a logo that doesn't look like it's been chewed by a dog...
Tools: Button/Command creator ¤ GZip Discrimination Tester ¤ INI Difference Tool
Wishes: Advanced Page Management ¤ Sticky Searches (mock-up) ¤ Better Find Interface ¤