I want show date last modification of my pedogree and than I added this to file header.php in directory themes/simplygreen:
$datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
but the date is wrong.
Can anybody help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You'll have t be more specific about "but the date is wrong". PHP caches information about files so that repeated enquiries about file status, etc. respond more quickly.
Check the on-line PHP manual (do a Google search for "PHP filemtime") for a description. You can clear the cache to obtain true real-time information. That's the clearstatcache() function.
If you're trying to determine when your database was last modified and you're checking the GEDCOM's date & time of modification, you will need to set the GEDCOM configuration option to synchronize the database and GEDCOM. If you have a significant number of persons in the database (more than 5000 or so), this can slow the program significantly when database changes occur.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
THX for your reply.
OK. Here is link on my site with problem: http://hajek-rodokmen.info/phpgedview42/index.php
Look for this: Poslední aktualizace: 01.01.1970
In english: Last modification: 01.01.1970
Now I trying this:
To file functions_print.php I added this function:
function print_dat_pos_akt() {
global $datposakt;
$datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
print $datposakt;
}
function print_dat_pos_akt() {
global $datposakt;
$datposakt=date("d.m.Y", filemtime(dirname(__FILE__)."/../../index/hajekjosef1886-20-12-05-08-ful-utf8"));
print $datposakt;
}
Thank you for the opportunity to discuss with you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want show date last modification of my pedogree and than I added this to file header.php in directory themes/simplygreen:
$datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
but the date is wrong.
Can anybody help me?
What's "pokus.php"?
THX for your reply. pokus.php is only test file for testing of its date.
You'll have t be more specific about "but the date is wrong". PHP caches information about files so that repeated enquiries about file status, etc. respond more quickly.
Check the on-line PHP manual (do a Google search for "PHP filemtime") for a description. You can clear the cache to obtain true real-time information. That's the clearstatcache() function.
If you're trying to determine when your database was last modified and you're checking the GEDCOM's date & time of modification, you will need to set the GEDCOM configuration option to synchronize the database and GEDCOM. If you have a significant number of persons in the database (more than 5000 or so), this can slow the program significantly when database changes occur.
THX for your reply.
OK. Here is link on my site with problem:
http://hajek-rodokmen.info/phpgedview42/index.php
Look for this: Poslední aktualizace: 01.01.1970
In english: Last modification: 01.01.1970
Now I trying this:
To file functions_print.php I added this function:
function print_dat_pos_akt() {
global $datposakt;
$datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
print $datposakt;
}
and
in file header.php I call this function:
<?php print_dat_pos_akt(); ?>
but the date is still wrong.
Here is my file header.php:
http://hajek-rodokmen.info/tmp/header.php
Thanks again for your interest.
Sorry, it should be better:
http://hajek-rodokmen.info/tmp/header.zip
Heureka. I found the solution. Here is my code:
function print_dat_pos_akt() {
global $datposakt;
$datposakt=date("d.m.Y", filemtime(dirname(__FILE__)."/../../index/hajekjosef1886-20-12-05-08-ful-utf8"));
print $datposakt;
}
Thank you for the opportunity to discuss with you.