누구든지이 코드의 문제점을 알고 있다면 알려주십시오.jquery 게시물을 사용하여 PHP 파일 업로드
기본적으로 내가
<?php
echo $file['tmp_name'];
?>
업로드 된 파일 이름을 다시 반환되지 않습니다
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(event) {
$('#form1').submit(function(event) {
event.preventDefault();
$.post('post.php',function(data){
$('#result').html(data);
});
});
});
</script>
</head>
<body>
<form id="form1">
<h3>Please input the XML:</h3>
<input id="file" type="file" name="file" /><br/>
<input id="submit" type="submit" value="Upload File"/>
</form>
<div id="result">call back result will appear here</div>
</body>
</html>
jQuery를
내 PHP 'post.php'을 사용하여 파일을 업로드 할 수 있습니다. 문제는 내가 업로드 된 파일에 액세스 할 수 없습니다.미리 감사드립니다. Shiv
무엇을 당신은 –