6 Aug 2012 02:03
Looking for inspitarion ...
I keep on working in my node-based http server.
I am implementing sessions and, into this, installing code to be
executed latter.
So I found a problem and need a bit of inspiration.
The fast way to explain the problem is ask: how can un-bind a variable?
well, I have a function:
function hello()
{
$server.response.echo("Hi, world!");
$server.end();
}
First time the page is requested, this function is installed, and second
time this functions is executed (both with different response objects).
This doesn't work, but this does:
function hello($server)
{
$server.response.echo("Hi, world!");
$server.end();
}
Obviously the problem is the first version of 'hello' store the
reference to $server, and the second no, because it is passed as
(Continue reading)
RSS Feed