Scripts organization issue

I have a script named db_code.php and in it I have this line:

require_once 'mailfucs_fron.php';

Then.there is another script named mails.php with the following require directive in it:

require_once 'mailfucs_fron.php'; 
require_once 'db_code.php';

In mails.php a function is called…this one(it’s declaration is in db_code.php):

mail_support($conn, $name, $email, $message,‘support’);

But when this function is about to be parse I get an error that tells me that his function cannot be redeclared. This happens cause in db_code.php mailfucs_front.php is also required.

What can I do to get out of this mess?What do you propose?

It can’t be.
The very purpose of *_once operators is to include the code only once.

So your error is coming from some other direction.

I ommited the ```
_once

Now I fixed it,thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.