CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    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?

  2. #2
    Join Date
    May 2004
    Location
    Pell City, Alabama
    Posts
    126

    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
  •  





Click Here to Expand Forum to Full Width

Featured