Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのpdfファイルを持っています:
SA Pias - Margaça Branco.pdf
これを使用してアクセスします:
href="SA Pias - Marga%E7a Branco.pdf"
ブラウザで問題なく開きますが、ユーザーが保存しようとすると、それらの「奇妙な」文字が表示されます。
ユーザーが PDF を保存するときに、本名 (SA Pias - Margaça Branco.pdf) を表示する方法はありますか?
PHPを使用できますか?
もし、そうなら、
リンクを次のように変更するだけです。
href="file.php?strName=Branco"
次に、file.php に以下を追加する必要があります。
header('Content-Disposition: attachment; filename="SA Pias - Margaça Branco.pdf"');