I am working on a Web chat application. I recently ran into a problem where a particular session variable is not being saved. I have no clue why this is happening as everything else appears to work fine. Code:
This is the class that invokes the function the c开发者_C百科ommand is associated with. It is called like this: Command::process("whois", "username_goes_here");
What could be the possible problem and how do I fix it?
In case you need to save Objects in a session, please note, that the object's class needs to be loaded before the saved Objects get back to life from the session.
In this case, load the object's class definition first, then read the object from a session.
PS: Hopefully, the value of $command
doesn't get passed directly from the HTTP request into the function...
精彩评论