~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
jpadie - thanks!
For some reason, my include_once "daysago.php" file,
(the name I called your script),
php had trouble finding - even though it resides
in the same directory with my other include_once script "config.php". (see error below).
This forced me to use your code inline.
Then it worked just right.
Might you know why the included file couldn't be found?
When I invoked your script with: $p5 = getdaysago($p5);
The error was:
function getdaysago($date) { $then = strtotime($date); $diff = time() - $then; $days = floor($diff/(60*60*24)); return $days; }
Fatal error: Call to undefined function getdaysago() in /Applications/MAMP/htdocs/phpQuery_test2/indexHPP.php on line 50
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.