|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-21 02:44 UTC] jan@php.net
[2002-11-21 02:58 UTC] alan_k@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 14:00:02 2025 UTC |
PHP Fatal error: Cannot redeclare unixdate() in /web/htdocs/home/pnadodb/adodb.inc.php on line 147 Here it's the code that generate the error: -------- /** * Also in ADORecordSet. * @param $v is a date string in YYYY-MM-DD format * * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format */ function UnixDate($v) { if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", ($v), $rr)) return false; if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0; // h-m-s-MM-DD-YY return mktime(0,0,0,$rr[2],$rr[3],$rr[1]); } ---------------- The funcion is called in this way: --- else $d = ADOConnection::UnixDate($d); -------- The same program works find with Apache1.3.27+php-4.2.3 You can try this program at http://php.weblogs.com/ADODB it's named "ADOdb Library for PHP" Regards.