Global file in PHP
-
Hi, What's the equalive to global file in PHP? I was using it in ASP.NET and I want to know if there is similar thing in PHP?
Technology News @ www.JassimRahma.com
-
Hi, What's the equalive to global file in PHP? I was using it in ASP.NET and I want to know if there is similar thing in PHP?
Technology News @ www.JassimRahma.com
If you are referring to the global.asx file you find in most ASP.NET projects, then no, PHP doesn't work like the event driven setup that ASP.NET applications are. When a request comes in for a PHP file, that file is handed to the PHP interpreter which adds in any included files and then parses the file in memory. Just like if you were given a book and you were to read it line by line through the entire book. It then takes the response generated from interpreting the code and gives it back to the user. It does not fire events as it interprets. So there is no such thing as Application_BeginRequest or Application_Start calls. It just reads the file and generates a response. Hopefully that is what you mean. :)
Looking for a programming project? Check out my book at http://www.coderslexicon.com/downloads/the-programmers-idea-book/