이 코드를 다시 작동 시키려고합니다. 내가 액세스하려고하는 파일 이름조차 에코를 만들지 않은 것을 만들었습니다. 도와주세요, 나는 아무 소용이 함께 이미 시간 이상 동안보고 있었어요 :( 참고 : 나는 심지어 여기에 $의 이름을 표시하지 수파일 업로드 PHP 구문 오류
당신은에 mutlipart 양식 데이터를 사용할 필요가<?php
error_reporting(0);
if($_POST['submit']){
//file uploading
$name = basename($_FILES['upload']['name']); //name plus extention
print_r($_FILES['upload']);
$t_name = $_FILES['upload']['tmp_name'];
$dir = 'gallery_i';
$thumbs = 'gallery_t';
if(move_uploaded_file($t_name,$dir.'/'.$name)){
$resizeObj = new resize($dir.'/'.$name);//Resize image (options: exact, portrait, landscape, auto, crop)
$resizeObj -> resizeImage(200, 200, 'auto'); //Save image
$resizeObj -> saveImage($thumbs.'/'.$name, 100);
echo 'file upload nicely';
//file upload successfull
}
}
?>
<div class='home'>
<form method='post' action='other.php'>
Name: <input class='reg' type='text' name='prodname'/><br/><br/>
Description:<br/> <textarea class='reg' name='description' rows="4" cols="40"> </textarea> <br/><br/>
<input type='file' name='upload' />
<input type='submit' value='submit' name='submit'/>
</form>
</div>
출력은 무엇입니까? – Alp
이 페이지는'other.php'입니까? – mellamokb
파일을 이동하려는 디렉토리의 파일 권한을 확인 했습니까? –