Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Oh No!

Sign in to follow this  
Colin Jeanne


It seems that I misunderstood exactly how PHP's include_once() and require_once() worked. I assumed that no matter how many times they were called they would still execute the global code. It seems very obvious to me now that that cant possibly be the case not just because it doesnt make any sense but because it certainly doesnt work like that in my CMS [dead].

This is a big problem because my design rests on this assumption! The global code that is executed returns a list of the functions that perform the various content generating and administrative tasks of the module so that the CMS can execute those operations. If I cant get at those functions then bad things happen.

Here's my new solution: I'm going to add a field to the Registered table. This field will be the name of the function in the module that returns these other administrative functions.

*Edit - nevermind. One of those functions is a function that helps install the module. This installation would fill such a field. Without this field I cant call the installation function. Without the installation function I cant fill the field.

I suppose I could force a strict naming convention... but I dont want to do that. Hopefully I'll become inspired to a better solution.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!