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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.