mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
issue 3636, makeDir에서 하위디렉토리 생성방식 변경
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13200 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d9f001266c
commit
5fa0bf23d7
1 changed files with 24 additions and 26 deletions
|
|
@ -318,11 +318,17 @@ class FileHandler
|
|||
*/
|
||||
function makeDir($path_string)
|
||||
{
|
||||
static $oFtp = null;
|
||||
|
||||
// if safe_mode is on, use FTP
|
||||
if(ini_get('safe_mode'))
|
||||
if(!ini_get('safe_mode'))
|
||||
{
|
||||
@mkdir($path_string, 0755);
|
||||
@chmod($path_string, 0755);
|
||||
}
|
||||
// if safe_mode is on, use FTP
|
||||
else
|
||||
{
|
||||
static $oFtp = null;
|
||||
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
if($oFtp == null)
|
||||
{
|
||||
|
|
@ -356,34 +362,26 @@ class FileHandler
|
|||
{
|
||||
$ftp_path = "/";
|
||||
}
|
||||
}
|
||||
|
||||
$path_string = str_replace(_XE_PATH_, '', $path_string);
|
||||
$path_list = explode('/', $path_string);
|
||||
|
||||
$path = _XE_PATH_;
|
||||
for($i = 0; $i < count($path_list); $i++)
|
||||
{
|
||||
if(!$path_list[$i])
|
||||
|
||||
$path_string = str_replace(_XE_PATH_, '', $path_string);
|
||||
$path_list = explode('/', $path_string);
|
||||
|
||||
$path = _XE_PATH_;
|
||||
for($i = 0; $i < count($path_list); $i++)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$path .= $path_list[$i] . '/';
|
||||
$ftp_path .= $path_list[$i] . '/';
|
||||
if(!is_dir($path))
|
||||
{
|
||||
if(ini_get('safe_mode'))
|
||||
if(!$path_list[$i])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$path .= $path_list[$i] . '/';
|
||||
$ftp_path .= $path_list[$i] . '/';
|
||||
if(!is_dir($path))
|
||||
{
|
||||
$oFtp->ftp_mkdir($ftp_path);
|
||||
$oFtp->ftp_site("CHMOD 777 " . $ftp_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
@mkdir($path, 0755);
|
||||
@chmod($path, 0755);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return is_dir($path_string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue