-
August 10th, 2005, 06:28 PM
#1
Need help with a PHP algorithm
Hey all. This is my first post so I thought I would ask.
I am developing a script which runs on PHP with MySQL Backend. The scipt will have a main interface where users can add custom written modules to be displayed. These modules will be written by different people and multiple modules can be displayed on the page. These plugins will be seperate php files which will be included when needed
The problem is, that if there are 2 different modules that have the same function declared, this will cause an error. I need a way where I can include the file, evaluate it and then close it so as not to cause this problem or any other way to alleviate this problem.
Any suggestions?
-
August 12th, 2005, 12:37 PM
#2
Re: Need help with a PHP algorithm
Put your functions inside a class, so that each file you include contains a class. Then it doesn't matter if any of the function names collide anymore so long as the class names don't collide.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|