jQuery 다중 파일 업로드 플러그인 v1.48의 파일 업로드 이름을 표시하는 방법은 무엇입니까?jQuery 다중 파일 업로드 플러그인의 파일 업로드 이름을 표시하는 방법
사용자가 파일을 업로드 한 후 프로필 아래에 업로드 한 파일을 표시 할 수있는 방법이 있습니까?
1.if (isset($_FILES['tb-documents'])) {
$documents = $_FILES['tb-documents'];
foreach ($documents['name'] as $key => $value) {
if ($documents['name'][$key]) {
$document = array(
'name' => $documents['name'][$key],
'type' => $documents['type'][$key],
'tmp_name' => $documents['tmp_name'][$key],
'error' => $documents['error'][$key],
'size' => $documents['size'][$key]
);
$status = wp_handle_upload($document, array('test_form' => false));
if(!isset($status['error'])) {
$uploads = wp_upload_dir();
add_user_meta($user->ID, 'tb-documents', $uploads['url'].'/'.basename($status['file']));
}
}
}
}
업로드가 사용자 프로필에서 제대로 작동합니다. 그러나 업로드 한 파일 이름을 찾아서 업로드 된 모든 파일 이름을 표시하고 싶습니다.
어떤 변수를 사용해야합니까?
1.I tried this, $content .= '.$documents['name']'; but it doesn't work. It shows syntax error.
안녕하세요, 파일 이름을 가져 오기 위해 어떤 변수를 사용해야합니까? $ content. = '
Download Document #' . ($y+1) . ''; } 이것은 사용중인 코드이지만 텍스트 링크를 다운로드 문서로 표시합니다. 고정 된 다운로드 문서를 실제 파일 이름을 나타내는 텍스트로 변경하는 방법이 있습니까? – user2987446
$ documents [ 'name'] [$ key]을 (를) 사용할 수 없습니까? – dikirill