echo "$file[0][file]"; 이라고 하면, Array[file] 이라고 떠버려요.

echo "$file[0][file]"; 이라고 하면, Array[file] 이라고 떠버려요.

QA

echo "$file[0][file]"; 이라고 하면, Array[file] 이라고 떠버려요.

본문

안녕하세요. :)

파일명을 호출해야 되는데요.

write.skin.php 에서 echo "$file[0][file]"; 이라고 하면,

Array[file] 이라고 떠버려요.

3546904101_Nyi7HAVW_29.jpg 이런식으로 암호가 들어간 파일명을 호출하려면

어떻게해야 되나요?

도움 부탁드려요~

이 질문에 댓글 쓰기 :

답변 4

write.skin.php 에서 echo "$file[0][file]"; 이라고 하면,<---

write.skin.php 에서 echo $file[0][file]; 또는 echo "{$file[0][file]}";<-- 이 경우 따옴표는 필요없어요

 

$delfile1 = "$g4[path]/data/file/$bo_table/$file[0][file]"; <--

$delfile1 = "$g4[path]/data/file/$bo_table/".$file[0][file];

또는

$delfile1 = "$g4[path]/data/file/$bo_table/{$file[0][file]}";  

// 수정의 경우 파일업로드 필드가 가변적으로 늘어나야 하고 삭제 표시도 해주어야 합니다.
if ($w == "u")
{
    for ($i=0; $i<$file[count]; $i++)
    {
        $row = sql_fetch(" select bf_file, bf_content from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
        if ($row[bf_file])
        {
            $file_script .= "add_file(\"<input type='checkbox' name='bf_file_del[$i]' value='1'><a href='{$file[$i][href]}'>{$file[$i][source]}({$file[$i][size]})</a> Delete";
            if ($is_file_content)
                //$file_script .= "<br><input type='text' class=text size=50 name='bf_content[$i]' value='{$row[bf_content]}' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
                // 첨부파일설명에서 ' 또는 " 입력되면 오류나는 부분 수정
                $file_script .= "<br><input type='text' class=text size=50 name='bf_content[$i]' value='".addslashes(get_text($row[bf_content]))."' title='Enter contents corresponding to upload an image file.'>";
            $file_script .= "\");\n";
        }
        else
            $file_script .= "add_file('');\n";
    }
    $file_length = $file[count] - 1;
}

바로 출력이 아닌 위 구문을 활용해 보시기 바랍니다..
$file 을 설정하는 구문이 필요하며

$file[file][0][file]

이런형태가 되어야 할것으로 보입니다..
답변을 작성하시기 전에 로그인 해주세요.
전체 10,637
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT