Default.gif (this image is a template thumbnail) must be a valid template in the directory
Copy CodeThe code is as follows:
function Get_template ()
{
$template = Array ();
$dir = Cms_root. ' /tpl/';
$n = 0;
if (Is_dir ($dir)) {
if ($dh = Opendir ($dir)) {
while (($file = Readdir ($DH))!== false) {
if ($file = = '. ' or $file = = ': ' or $file = = '. SVN ')
{
Continue
}
if (Is_dir ($dir. $file))
{
if (File_exists ($dir. $file. ' /default.gif '))
{
$template [$n] [' dir '] = $file;
$template [$n] [' pic '] = '/tpl/'. $file. ' /default.gif ';
}
}
$n + +;
}
Closedir ($DH);
}
}
return $template;
}
http://www.bkjia.com/PHPjc/322315.html www.bkjia.com true http://www.bkjia.com/PHPjc/322315.html techarticle The directory must have Default.gif (this image is a template thumbnail) of the template to copy the code as follows: function Get_template () {$template = array (); $dir = Cms_root. ' /tpl ...