Home > Article > Backend Development > Use Php to simulate asp.net page model_PHP tutorial
It is impossible to use php(as the current mainstream development language)to simulate asp.net(Microsoft’s most powerful development language), especially for php(As the current mainstream development language)Such a dynamic language with incomplete object-oriented support is even more difficult. When talking about simulation here, it means that asp.net can be understood through this example (Microsoft’s most powerful development language) ’s operating mechanism (again, it’s just a model). The code is very simple, no need to elaborate. This test is under win2000, iis ( Microsoft's WEB server platform) 5, php (as the current mainstream development language) 4.4.0 runs through
page.php (as the current mainstream development language) Mainstream development language)
(as the current mainstream development language)
/***************************************************** ***************************
*Sinoprise Function Classes
*CopyRight(c):2006 Sinoprise Technology Lab
*
*Unit Name: page.php(as the current mainstream development language)
*func:
*Crate:Shuguang Yin 2006-07-15
** *************************************************** ****************************/
class SFC_Page
{
Cookie;
var $Env;*/
//Page control properties
var $EnableViewState;
//Page properties
var $CharSet;//Page character set
var $PageTitle;//Title of the page
function SFC_Page()
{
/*if (strcmp(substr(php
(as the current mainstream development language)
_VERSION,0,1) ,4)>=0){
$Server = $_SERVER; ;
$Files = $_FILES; $Env = $_ENV;
}else{
global $HTTP_SERVER_VARS,$HTTP_GET_VARS,$HTTP_POST_VARS,$HTTP_COOKIE_VARS,$HTTP_POST_FILES;
global $HTTP_ENV_VARS,$HTTP_SESSION_VARS;
$Server = $HTTP_SERVER_VARS;
$Session = $HT TP_SESSION_VARS;
$QueryString = $ HTTP_GET_VARS;
$Cookie = $HTTP_COOKIE_VARS;
$Files = $HTTP_POST_FILES;
}* /
$this->EnableViewState = false;
}
//Occurs before server state restoration
{
}
//Occurs after server state restoration, but before server-side events
{
}
//Occurs after the server-side event is fired, but before anything is generated
function PagePreRender()
}
//Occurs when the page is generated
function PageRender()
}
//Occurs after the web page is generated
function PageUnLoad()
}
//Display output
function Display()
$this->PageInit();
if ($this->EnableViewState ){
$this->DeCodeViewState();