![]() |
Including files with the same function names as existing funcs
Alright, so I've got a bit of a problem here. When I coded my existing CMS a few years ago I modeled some basics after vBulletin, as I was familiar with its code from modding it. So functions such as iif(), for example, are defined globally in my CMS.
With vB's new API feature, I want to recode the section of my code that creates a new vB thread for each news item added to the CMS so that it uses the API and everything is handled properly by vB. However, when I include the files necessary to do this, PHP complains that iif() is already defined. Anyone have any ideas? |
Try require_once() instead of include().
|
You cannot define a function twice, so you will either have to remove one of the definitions or rename one.
JFYI, I don't think any vb code actually uses IIF anymore, even though they still define it. |
Is there a way to sort of create a new PHP environment within the existing executing environment?
|
Why make an easy job hard ? just rename/remove either your function, or the vb function.
|
All times are GMT. The time now is 02:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|