업로드된 파일에 링크

<?php
if (isset($_POST["PHPSESSID"])) {
session_id($_POST["PHPSESSID"]);
}
session_start();

if (!isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) {
header("HTTP/1.1 500 File Upload Error");
if (isset($_FILES["Filedata"])) {
echo $_FILES["Filedata"]["error"];
}
exit(0);
}

$rnd_bit = rand(0, 99);

$upload_path = str_replace("\\", "/", realpath(dirname($_SERVER['SCRIPT_FILENAME']))) . "/uploads/";
$upload_path = "uploads/";

if (!move_uploaded_file($_FILES["Filedata"]["tmp_name"], $upload_path . $_FILES["Filedata"]["name"])) {
header("HTTP/1.1 500 Internal Server Error");
exit(0);
}
?>

업로드 페이지의 소스입니다
단순히 업로드만 되어지고 목록이 출력됩니다
이 목록의 각각의 파일들에 경로대로 링크가 걸렸으면 합니다
php를 전혀 몰라 도움을 청합니다
부탁합니다
|

댓글 1개

인덱스와 업로드 페이지외 스크립트 파일뿐입니다
유명한 swfupload 파일의 업로드 페이지입니다
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
18년 전 조회 1,119
18년 전 조회 1,106
18년 전 조회 2,112
18년 전 조회 1,707
18년 전 조회 1,451
18년 전 조회 1,555
18년 전 조회 2,005
18년 전 조회 1,713
18년 전 조회 1,586
18년 전 조회 1,539
18년 전 조회 2,054
18년 전 조회 1,629
18년 전 조회 1,628
18년 전 조회 1,776
18년 전 조회 2,201
18년 전 조회 1,946
18년 전 조회 1,905
18년 전 조회 2,747
18년 전 조회 1,964
18년 전 조회 1,701