English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is there any way to make use of application object as in ASP in PHP

2006-08-21 21:03:36 · 2 answers · asked by pakala venkata s 1 in Computers & Internet Software

2 answers

No.

ASP is a Windows-centric development platform. On Windows, multple instances of IIS run as multiple threads of a single process. As a result, they can communicate with each other. There are also drawbacks to this approach; threads cannot protect resources (such as files) from concurrent writes by other threads, since they all run under the same process ID (this is why PHP's file locking doesn't work on Windows); if one thread experiences fatal error, all other threads of the process go down as well.

PHP is Unix-centric development platform (although it has been ported to Windows as well). On Unix, there is no such thing as threading; a process may spawn other processes (usually referred to as child processes), but they will be fully developed separate processes, unaware of any other processes that may be running. Resource separation becomes possible; a dead process kills only itself and nothing else, etc.

If you need to share data between different instances of a PHP application, you need to use file system or database for that. If you are reasonably sure that your application is not going to be deployed as Windows CGI, you can also use shared memory:

http://www.php.net/shmop

.

2006-08-22 07:20:34 · answer #1 · answered by NC 7 · 0 0

With MS-sq. i could want ASP.internet as they are optimized for another. With Hypertext Preprocessor, MySQL is a much greater efficient mixture. With solar Microsystems paying for MySQL, it is going to now beginning pulling multiple weight interior the corporate environment.

2016-12-11 13:06:19 · answer #2 · answered by ? 3 · 0 0

fedest.com, questions and answers