I have two files A & B.
All the files are linked. In file A, I have require_once(filename.php). In file B i have require(filename.php). For some reason this causes some conflict when running the code. There is code in File A that usually runs, but doesnt when the above is the case. Any idea why? Thanks.
Using require_once then require
Moderator: General Moderators
-
mediatagging
- Forum Newbie
- Posts: 3
- Joined: Wed Nov 11, 2009 1:53 am
Re: Using require_once then require
And what's in filename.php?
-
mediatagging
- Forum Newbie
- Posts: 3
- Joined: Wed Nov 11, 2009 1:53 am
Re: Using require_once then require
Filename.php just has a function. A blank function that doesn't get called. It definitely has something to do with the requires because once I commented out the first one everythig worked fine.
Re: Using require_once then require
Can't define a function twice. One file included filename.php, then another. That second time caused PHP to halt.
Use require_once.
Use require_once.