萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> php編程 >> PHP靜態類

PHP靜態類

[PHP]代碼

view source   print? 001 <?php 002 /******************8PHP靜態類*************/ 003 class Shtml 004 { 005    var $Templet; 006    var $DataSource; 007    var $Dir; 008   009    var $fileName; 010    var $mod; 011    var $handle; 012   013    function Shtml($fileName = "") 014    { 015    $this->fileName = $fileName; 016    $this->mod = "wb"; 017    $this->handle = false; 018   019    $this->Templet = ""; 020    $this->DataSource = array(); 021    $this->Dir = ""; 022    } 023   024    // 綁定數據源,參數為一數組 025    function BindData($arr) 026    { 027    $this->DataSource = $arr; 028    } 029   030    // 設置文件存放路徑 031    function SetDir($dir) 032    { 033    $this->Dir = $dir; 034    } 035    function SetFileName($fileName) 036    { 037    return $this->fileName = $fileName;
copyright © 萬盛學電腦網 all rights reserved