Jump to content

Stop MVC Variables from being Overwritten


Picabrillo

Recommended Posts

[font=Century Gothic][size=9pt]
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 I initially thought couldn't happen with object classes but proved false with PHP4.

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.

Thanks in advance, and sorry for subjecting you to such a long message. If it makes no sense then please let me know.
[/size][/font]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.