Stop MVC Variables from being Overwritten
Hi,
I've been developing a PHP4 MVC (Model-View-Controller) Framework, but I thought instead of using object classes I'd see whether it's plausible to make it with functions. I've managed to get a fair bit done, but I've recently hit a snag.
The problem is that I'm using a lot of variables to manage the many routines that are required when it comes to creating individual pages. Because the pages use their own variables, there's a possibility that variables needed by the Framework could accidentally be overwritten - a problem you wouldn't have with object classes.
My initial thought was to create a routine that checks and shows an error if variable already exists, but that would make the site more insecure, as hackers could use this vulnerability to scan for words and overwrite content.
Ideally I need to find a way to separate the variables used in the Framework from those generated by the individual pages. Any thoughts, simple or complex, would be welcome. If it makes no sense then please let me know.
Thanks in advance, and sorry for subjecting you to such a long message
________
"A computer once beat me at chess, but it was no match for me at kick boxing" - Emo Philips
|