[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;