当前位置: 移动技术网 > IT编程>开发语言>PHP > php类

php类

2019年06月10日  | 移动技术网IT编程  | 我要评论

nvidia万能显卡驱动,富士通brick,玄幻小说网站

<?php
/*----------------------------------------------------------------//
 * class::    ini
 * function:: to install the system which is requested from client     
 * author::   kevin#    
 * qq::       84529890
 * date::     2006.10.24
//----------------------------------------------------------------*/
 require_once( class_sys_path . "class.db.php");
 class ini {
 /*
 * member variable $defaultplay
 * to set the variable play 
 */
 var $defaultplay = "main";
 /*
 * member variable $db
 * to set the object : database
 */
 var $db;
 /*
 * member variable $play
 * record the parameter of play
 */
 var $play;
//////@@@@ member function list @@@@\\\\\\\
//-======================================-\\
//      lastmodifytime::2006.11.16 
//-======================================-\\
////////////////////////////////////////////
 /*
 * function :: setdb($db)
 * set the global database object
 */
 function setdb($db){
     return $this->db = $db;
 }
 /*
 * function::loadsystem($play)
 * load system
 */
 function loadsystem($play){
     if( $this->isvalidplay($play) ){
      require_once("class.smarttemplate.php"); 
  require_once( $play ); 
  $playlikeabird = new main;
 }else{
     $this->halt("invalid access....");
 }
 }
 /*
 * function:: inicon()
 * install database
 */
 function inicon(){
     global $db;
 $db = new db( host_addr , host_user , host_psw , db_name );
 }
 /*
 * function::getdb()
 * to get the current database object
 */
 function getdb(){
     return $this->db;
 }
 /*
 * function::getplay()
 * get the play which is post from client
 */
 function getplay(){
     return $play = empty( $_request["play"] ) ? $this->defaultplay : $_request["play"];
 }
 /*
 * function:: isvalidplay($play)
 * to check legitimacy if the play parameter is 
 */
 function isvalidplay($play){  
 if( file_exists( $play  ) ){
     return true;
 }else{
 return false;
}
 }
 /*
 * function:: halt($msg)
 * show message on the browser 
 */
 function halt($msg){
     echo "<font color=\"#ff0000\">" . $msg . "</font>\n<br />";
 }
 /*
 * function :: inisystem()
 * install system
 */
 function inisystem(){
     $this->inicon();
 $this->setdb($db);
 $play = $this->getplay();
 return $play = $this->resetplay($play);
 }
 /*
 * function :: resetplay($p)
 * to re-define the play's parameter
 */
 function resetplay($p){
     return $p = class_path . entry_first_format . $p . entry_last_format;
 } 
 /*
 * function:: ini()
 * to link the database and get the play which post from client
 */
 function ini(){
     $play = $this->inisystem();
 $this->debug($play);
 $this->loadsystem($play);
 $this->close();
 }
 /*
 * function:: debug($play)
 * to show the debug information
 */
 function debug($play){
     if( debug ) $this->halt("play -> $play");
 }
 /*
 * function::close()
 * unset database
 */
 function close(){
     return $this->db = null;
 }
 ///////@@@@@@@@@@@@@@@@@@@@@@@@@  define class over @@@@@@@@@@@@@@@@@@@@@@@@@\\\\\\\\
 }
?>

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网