Re: Help with redeclare error
| From: | Ashley Sheridan | Date: | Fri, 28 Oct 2011 06:26:26 +0000 |
| Subject: | Re: Help with redeclare error | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315478@lists.php.net to get a copy of this message | ||
On Thu, 2011-10-27 at 17:40 -0700, UltraMega Admin wrote:
> On 10/27/2011 5:33 PM, Daniel Brown wrote:
> > On Thu, Oct 27, 2011 at 20:06, Jason Pruim<lists@pruimphotography.com> wrote:
> >> Most likely you have in included in 2 files... Look into it from that angle... It only
> >> needs to be included in 1 file to work throughout all the files.
> > Prune is spot-on. That error generally happens when you include a
> > file that has already been included, which contains function
> > definitions. Look at the code in the files the error mentions, on the
> > lines it specifies, and - most likely - you'll see an include.
> > Changing them to include_once instead will resolve the issue, as PHP
> > will just skip the order if it's already been done within the
> > execution of the code.
> >
>
> A function with that name already exists in PHP as of 5.3.0. You'll have
> to rename it or something.
>
> http://us2.php.net/manual/en/function.date-diff.php
>
Or wrap it inside a function_exists() call assuming that both your
function and the internal one do the same thing.
--
Thanks,
Ash
http://www.ashleysheridan.co.uk