Google のヒントを試しても、PDF ファイルをアップロードできません。しかし、私のphpアップロードはまだ機能しません。フォルダのアクセス許可を に変更しました777
。
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="3500000" />
Upload File: <input name="uploadedfile" type="file" />
<input type="submit" value="Upload File" />
</form>
$target_path = "/home/jeinqa/www/apps/upload/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else{
echo "There was an error uploading the file, please try again!";
}
見せる :
There was an error uploading the file, please try again!
使用してみてくださいprint_r($_FILES);
:
Array ( [uploadedfile] => Array ( [name] => SOP-31 KW-HDR81BTJD.pdf [type] => [tmp_name] => [error] => 2 [size] => 0 ) ) There was an error uploading the file, please try again!