473,289 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

is there exist global.asa file in php

hi

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.

Jul 17 '05 #1
3 5473
vishal wrote:
hi

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.


(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
http://www.zend.com/zend/spotlight/prepend.php

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.

C.
Jul 17 '05 #2
Well Colin McKinnon perhaps someone out there has used asp 3.0 an
php.
So probably he knows some common things between asp and php

when a user ads some things in a shoping cart you probably store thi
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 a
event and delete this temporary information in your database

So the question is: How does php do that
http://eye.cc -php- web design
Jul 17 '05 #3
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

http://www.tonymarston.net

"themhz" <th****@gmail-dot-com.no-spam.invalid> wrote in message
news:jX*******************@news.sisna.com...
Well Colin McKinnon perhaps someone out there has used asp 3.0 and
php.
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?
http://eye.cc -php- web design

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dan Elliott | last post by:
Hello, Converting from a working C program to C++, I run into the following error: I have a header: (header.h) namespace shared{ ... struct X{ ...
6
by: Prince | last post by:
I have a question about the global.asax.cs file. I'm reading info from a database to populate a DataGrid. I read somewhere that the opening of the database should occur in the global.asax.cs...
22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
5
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
52
by: paytam | last post by:
Hi all Can anyone tell me how can I check that a file exist or no.I mean when you use this commands FILE *fp; if(!fp) //Could not open the file doen't show why it can not open it,may be the...
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
0
by: dankyy1 | last post by:
hi ,i have an asp.net project runs on local intranet ,i use global.asax's onerror section to catch errors.so i got a simpleauth service does not exists error from some network clients .Error details...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.