🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Oh No!

posted in Rarely Spoken
Published May 26, 2005
Advertisement
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.
Previous Entry Content vs. Structure
Next Entry The Solution
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

4E6 PyGame

1404 views

4E5

1138 views

Happy Yesterday!

1093 views

Another Game

1305 views

Merry Christmas!

1073 views

Hello There

1072 views

Yay!

1088 views
Advertisement