Class HTML
{
var $dir; Dir for the htmls (without/)
var $rootdir; Root of HTML files (without/): HTML
var $name; HTML file storage Path
var $dirname; The specified folder name
var $url; Gets the source page address of the HTML file information
var $time; HTML file information time to fill in overtime
var $dirtype; Directory Storage method: Year,month,,,,
var $nametype; HTML file naming method: Name
function html ($nametype = ' name ', $dirtype = ' year ', $rootdir = ' html ')
function Setvar ($nametype = ' name ', $dirtype = ' year ', $rootdir = ' html ')
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 ($cur _dir))
}
}
}
function Getdir ($dirname = ", $time =0)
{
$this->time= $time? $time: $this->time;
$this->dirname= $dirname? $dirname: $this->dirname;
Switch ($this->dirtype)
{
Case ' name ':
if (Empty ($this->dirname))
$this->dir= $this->rootdir;
Else
$this->dir= $this->rootdir. ' /'. $this->dirname;
Break
Case ' Year ':
$this->dir= $this->rootdir. ' /'. Date ("Y", $this->time);
Break
Case ' Month ':
$this->dir= $this->rootdir. ' /'. Date ("Y-m", $this->time);
Break
Case ' Day ':
$this->dir= $this->rootdir. ' /'. Date ("y-m-d", $this->time);
Break
}
$this->createdir ();
http://www.bkjia.com/PHPjc/631963.html www.bkjia.com true http://www.bkjia.com/PHPjc/631963.html techarticle class HTML {var $dir;//dir for the htmls (without/) var $rootdir;//root of HTML Files (without/): HTML var $name;//ht ML file storage path var $dirname; Specify the folder name ...