I’m currently working on an MVC Style framework for a company and for security reasons I need to make sure that the controller / method that’s passed via the Query String is valid chars to the RFC (which I can’t find). I need to be able to validate / sanitize class names according to what’s allowed by the PHP interpreter
Tag: methods
How to add a new method to a php object on the fly?
How do I add a new method to an object “on the fly”? $me= new stdClass; $me->doSomething=function () { echo ‘I’ve done something’; }; $me->doSomething(); //Fatal error: Call to …
What’s wrong with using $_REQUEST[]?
I’ve seen a number of posts on here saying not to use the $_REQUEST variable. I usually don’t, but sometimes it’s convenient. What’s wrong with it? Answer There’s absolutely nothing wrong with taking input from both $_GET and $_POST in a combined way. In fact that’s what you almost always want to do: for a plain idempotent request usually submitted