cannot redeclare error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
michaelh613
Forum Commoner
Posts: 38
Joined: Sun Mar 16, 2008 1:35 pm

cannot redeclare error

Post by michaelh613 »

I am getting this error message

Fatal error: Cannot redeclare function_name() (previously declared in C:\Inetpub\Sites\site_name\includes\functions.php:5) in C:\Inetpub\Sites\site_name\includes\functions.php on line 27

Whats confusing me is this occurs for every function in functions.php and I am not duplcating them. They are only in includes\functions.php

Any ideas what could cause this. I've checked if I might be including it twice but verified its only in once
User avatar
Mds
Forum Contributor
Posts: 110
Joined: Tue Apr 22, 2008 8:56 pm
Contact:

Re: cannot redeclare error

Post by Mds »

probably u use include('functions.php') more than one , in your code
michaelh613
Forum Commoner
Posts: 38
Joined: Sun Mar 16, 2008 1:35 pm

Re: cannot redeclare error

Post by michaelh613 »

Mds wrote:probably u use include('functions.php') more than one , in your code
I admit I posted this out of annoyed frustration.

I found I had included functions.php in another file that was included in this section of code.

This is a definate duh!! moment.

Thanks for the help
Post Reply