一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php 生成静态页面

时间:2008-04-24 编辑:简简单单 来源:一聚教程网

class html
{
    var $dir;        //dir for the htmls(without/)
    var $rootdir;    //root of html files(without/):html
    var $name;       //html文件存放路径
    var $dirname;    //指定的文件夹名称
    var $url;        //获取html文件信息的来源网页地址
    var $time;       //html文件信息填加时的时间
    var $dirtype;    //目录存放方式:year,month,,,,
    var $nametype;   //html文件命名方式:name
 
    function html($nametype=''name'',$dirtype=''year'',$rootdir=''html'')
    {
        $this->setvar($nametype,$dirtype,$rootdir);
    }
         
    function setvar($nametype=''name'',$dirtype=''year'',$rootdir=''html'')
    {
      $this->rootdir=$rootdir;
      $this->dirtype=$dirtype;
      $this->nametype=$nametype;
    }
 
    function createdir($dir='''')
    {
        $this->dir=$dir?$dir:$this->dir;
 
        if (!is_dir($this->dir))
        {
            $temp = explode(''/'',$this->dir);
            $cur_dir = '''';
            for($i=0;$i            {
                $cur_dir .= $temp[$i].''/'';
                if (!is_dir(
<