Re: User defined function problem
| From: | Jochem Maas | Date: | Tue, 18 Jul 2006 22:41:28 +0000 |
| Subject: | Re: User defined function problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239562@lists.php.net to get a copy of this message | ||
what Jon said.
but note it's better to stick your functions into a seperate 'funcs' file
and include_once() or require_once() that instead. at some stage you'll have so
many functions you may want to split them up into seperate 'funcs' files depending
on what they do (and/or what they are used for) but for now start by creating a
a single utility file that just contains functions you have written.
Stephen Lake wrote:
> Hey Guys and Gals,
>
> I am having a small problem with a user defined function, I placed it in a
> config file and it works as expected, but the problem seems to arise only
> when I try to use my login script for a members area I am redeveloping.
>
> The error message that comes up is the following:
>
> Fatal error: Cannot redeclare clean_sql() (previously declared in
> C:\Apache2\htdocs\braille\config.php:94) in
> C:\Apache2\htdocs\braille\config.php on line 108
>
> The problem is its claiming that I am trying to redeclare the function in
> the config file when there is only the original function.
>
> I checked in other area's where this config file is being used and I do not
> get this error. Nor am I including other files that have the config included
> in them.
>
> The problem is only in my login script. If anyone can give me a little
> insight into this error I would be greatly appreciated.
>
> Best Regards,
> Steve
>