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,192
14년 전 조회 1,918
14년 전 조회 1,187
14년 전 조회 1,177
14년 전 조회 1,131
14년 전 조회 2,102
14년 전 조회 1,992
14년 전 조회 1,184
14년 전 조회 1,253
14년 전 조회 1,395
14년 전 조회 2,025
14년 전 조회 1,060
14년 전 조회 2,013
14년 전 조회 1,289
14년 전 조회 1,123
14년 전 조회 1,248
14년 전 조회 1,325
14년 전 조회 1,399
14년 전 조회 1,658
14년 전 조회 1,852
14년 전 조회 1,181
14년 전 조회 1,266
14년 전 조회 1,182
14년 전 조회 1,173
14년 전 조회 1,339
14년 전 조회 1,384
14년 전 조회 5,198
14년 전 조회 1,157
14년 전 조회 2,782
14년 전 조회 9,611