deletePost unlink시 Windows에서 오동작 수정
This commit is contained in:
@@ -39,8 +39,8 @@ if($dt == $rf) {
|
||||
$response['result'] = 'FAIL';
|
||||
} else {
|
||||
$DB->Update('MEMBER', "PICTURE='', IMGSVR=0", "NO='{$SESSION->NoMember()}'");
|
||||
if(file_exists($dest)){
|
||||
@unlink($dest);
|
||||
if(file_exists(__DIR__.'/'.$dest)){
|
||||
@unlink(__DIR__.'/'.$dest);
|
||||
}
|
||||
|
||||
for($i=0; $i < $_serverCount; $i++) {
|
||||
|
||||
@@ -78,8 +78,8 @@ if(!is_uploaded_file($image['tmp_name'])) {
|
||||
$response['msg'] = '업로드에 실패했습니다!';
|
||||
$response['result'] = 'FAIL';
|
||||
} else {
|
||||
if(file_exists($old_path)){
|
||||
@unlink($old_path);
|
||||
if(file_exists(__DIR__.'/'.$old_path)){
|
||||
@unlink(__DIR__.'/'.$old_path);
|
||||
}
|
||||
$pic = "{$newPicName}?={$rf}";
|
||||
$DB->Update('MEMBER', "PICTURE='{$pic}', IMGSVR=1", "NO='{$SESSION->NoMember()}'");
|
||||
|
||||
Reference in New Issue
Block a user