I’m a beginner at PHP. I’m using Zend AMF which is used for RPCs. Once a particular function say Index.register() has been called by a client, I want it to invoke a script say Checker.php in the same folder, by passing a 'name' variable, which will constantly check the database for records associated with that 'name' and perform operations on the DB. Will the Checker script run independently of the Index script? How shall the value be passed?
I’m a beginner at PHP. I’m using Zend AMF which is used for RPCs.
Share
You may use session variables in PHP: the super globals array $_SESSION[] stores index/value pairs (variables, arrays and objects) across page requests. Practically:
So if – for example – a user succesfully logged in you may set $_SESSION[‘loggedin’] to true which can be accessed by all other scripts within the scope of the current PHP session. Also scripts may ‘reuse’ the same object if it is stored in the session (which may consume a lot of memory….).