1 вопрос.
вызываю
global_function::addfolder(MESSAGES_USERS,$row['default_home']);
что соответствует
function addfolder($url, $name){
mkdir($url.$name, 0755);
}
выводит ошибку
Warning: mkdir() [function.mkdir]: File exists in /home/www/z264906/htdocs/system/includes/php/global_function.php on line 92
MESSAGES_USERS это
define ('MESSAGES_USERS', $_SERVER['DOCUMENT_ROOT'].'/messages/users/');
не могу понять почему
2 вопрос.
оцените,пожалуйста, класс
и укажите недостатки
include_once ($_SERVER['DOCUMENT_ROOT'].'/system/global.php');
class them{
private $_theme_file = array();
function __construct(){
$this->_theme_file = parse_ini_file(ROOT_DIR.'/includes/moduls/them/them.ini');
}
function theme_include(){
include_once(ROOT_DIR.'/includes/moduls/them/'. $this->_theme_file['them'].'/index.html');
}
function theme_choice(){
$dir = ROOT_DIR.'/includes/moduls/them/';
$odir = opendir($dir);
while($rdir = readdir($odir)){
if (preg_match('/^[a-z0-9\-]+$/', $rdir) == true){
$files[ROOT_DIR.'/includes/moduls/them/'.$rdir]= $rdir;
}
}
closedir($odir);
return $files;
}
function addcss(){
$css = '/system/includes/moduls/them/'.$this->_theme_file['them'].'/stylesheet.css';
return $css;
}
}