is there exist global.asa file in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


i m new to php. previously i was working in asp. tell me is there any
file in php like we have global.asa in asp. if yes then tell me
name-structure of that file and if not then how can we accomplish that
functionality in php.

thxs for your reply in advance.

Re: is there exist global.asa file in php

vishal wrote:

Quoted text here. Click to load it

(hint - people who hang out here use PHP and don't necessarily know how ASP
works - next time you might give us a bit of clue).

go read">

But note that:
1) this a crap way to implement templating
2) if you just want to create class definitions, and are using PHP5, the
autoloader is a better way to solve the problem.


Php And global.asa

Well  Colin McKinnon perhaps someone out there has used asp 3.0 and


So probably he knows some common things between asp and php.

when a user ads some things in a shoping cart you probably store this

information in a database.

what happends if the user closes the browser?

Asp has global.asa, so when the session times out you can work with an

event and delete this temporary information in your database.

So the question is: How does php do that? -php- web design

Re: Php And global.asa

PHP does not do that automatically, you have to write the code yourself. The
steps to achieve this are as follows:
(1) Write session data to a database, not to a disk file.
(2) Set the garbage collection to occur at whatever interval you like (10
mins, 60 mins, whatever)
(3) As part of this garbage collection look for entries in the shopping cart
and take whatever action is required.

Tony Marston

Quoted text here. Click to load it

Site Timeline