jQuery 및 PHP를 사용하는 응용 프로그램에서 작업하고 있습니다. 이미 데이터를 저장할 파일 이름이있는 다른 이름으로 저장 대화 상자로 사용자에게 메시지를 표시하려고합니다. 나는 사용자가 해당 전체 경로가 필요브라우저로 저장 대화 상자에서 경로 가져 오기
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>iframe downloader thingy</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a#linky').click(function(){
var iframe = document.createElement("iframe");
iframe.src = 'http://cl.ly/120d44203F223O1X2T43/example_branding.zip';
iframe.style.display = "none";
document.body.appendChild(iframe);
return false;
});
});
</script>
</head>
<body>
<a id="linky">Click to download</a>
</body>
</html>
:
header('Content-disposition: attachment;filename=whatever.dat');
은 내가 본 또 다른 기술이있다 : 자, 다음을 사용하여이 주제에 꽤 많은 게시물이 있었다 PHP 서버 스크립트에서 추가 처리를 위해 나에게 반환 된 Save As 대화 상자에서 선택합니다. 내가하려는 일은 MySQL 데이터를 가져 와서 해당 데이터를 Outlook 또는 Thunderbird 메일 클라이언트의 입력으로 쉼표로 구분 된 텍스트 파일로 저장하는 것입니다.
바라건대, 나는 이것을 분명히 설명했다. 감사합니다
에드 코헨
당신은 할 수 있으면 할 수있는 몇 가지 보안 의미. 어째서 내 hdd 디렉토리 구조를 알고 싶습니까? –
항상 파일에 트로이 목마를 포함시킬 수 있습니다. :) –