T

유창화님 감사합니다.~

<form name='fconfigform' method='post' onsubmit="return fconfigform_submit(this);" >
 
이렇게 했었는데....
 
원격 도움으로 enctype="multipart/form-data"를 추가하니까 아주 잘되네요.
 
정말감사합니다.
고수의 손길은 역시 다르군요~!
|

댓글 1개

// --------------------------------------------------- //
// FILE업로드 //
// --------------------------------------------------- //
// 도움: 그누보드 - 유창화님 //
// --------------------------------------------------- //
$path = $g4['path'] . '/data/watermark'; // 파일 업로드 경로
$file = $path . '/watermark.png';

if($_FILES['watermark_file']){ // 첨부파일이 있으면 작동

if (!is_dir($path)){

@mkdir($path, 0707);
@chmod($path, 0707);

if (!is_dir($path)) {

alert($path . ' 디렉토리를 생성할수 없습니다.');
}
}

if($_FILES['watermark_file']['error'] > 0){
}
else{

$tmp_name = $_FILES['watermark_file']['tmp_name'];
$name = $_FILES['watermark_file']['name'];

if(is_uploaded_file($tmp_name)){ // 파일 업로드 성공시

@move_uploaded_file($tmp_name, $file); //tmp에서 파일위치 변경
}
}
}

if (empty($file) || !is_file($file)) {
$query = "select * from $g4[news_config]";
$result = mysql_query($query);
$news_config_file = mysql_fetch_array($result);
$file = $news_config_file[watermark_file];
}

if (!file_exists($file)){ // 업로드된 파일이 없으면...
$file = "";
}

// --------------------------------------------------- //
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
14년 전 조회 1,173
14년 전 조회 1,904
14년 전 조회 1,169
14년 전 조회 1,155
14년 전 조회 1,113
14년 전 조회 2,084
14년 전 조회 1,975
14년 전 조회 1,163
14년 전 조회 1,239
14년 전 조회 1,377
14년 전 조회 2,007
14년 전 조회 1,041
14년 전 조회 1,993
14년 전 조회 1,266
14년 전 조회 1,107
14년 전 조회 1,225
14년 전 조회 1,306
14년 전 조회 1,379
14년 전 조회 1,635
14년 전 조회 1,828
14년 전 조회 1,161
14년 전 조회 1,244
14년 전 조회 1,158
14년 전 조회 1,137
14년 전 조회 1,325
14년 전 조회 1,364
14년 전 조회 5,177
14년 전 조회 1,137
14년 전 조회 2,760
14년 전 조회 9,586