머

업로드된 파일에 링크

<?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 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
08-02-13 조회 1,043
08-02-13 조회 965
08-02-13 조회 1,043
08-02-13 조회 1,173
08-02-13 조회 1,157
08-02-13 조회 2,164
08-02-13 조회 1,766
08-02-13 조회 1,501
08-02-13 조회 1,618
08-02-13 조회 2,054
08-02-13 조회 1,759
08-02-13 조회 1,631
08-02-13 조회 1,598
08-02-13 조회 2,108
08-02-13 조회 1,685
08-02-13 조회 1,674
08-02-13 조회 1,829
08-02-13 조회 2,254
08-02-13 조회 2,008
08-02-13 조회 1,959