Frage

I want to know what a server does to run a php application. Below is what I think:

client A types www.blahblahblah.blah/

  1. Server resolves url and directory etc.
  2. Server go the index.php
  3. index.php has a Singleton Pattern Class in it with a static variable called instance.

Now does the server allocate the memory to that static variable in its own RAM so that all the requests following this first one uses the same static variable? OR for every new request does the server allocate new memory and that new memory will have a new space allocated to that static variable?

My Confusion: if every request is run in its own memory space then what is a persistant connection?

Second thing I wondering about: Can I have a desktop program which is continuously sending a special key to my web application and my web application is sending the key back continuously to make HTTP a connection full instead of connection less? That way I can confirm who is connected to my APP as a client instead who is connected to INTERNET. I know sessions but they make http connection less and then chance of spoofing and session hijacking is there. I know you can make session secure but still my App won't know if the client is dead and can delete the data from the session and tell others that client blah is disconnected.

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
scroll top