如何编码下载按钮 [英] How To Code A Download button

查看:67
本文介绍了如何编码下载按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



请帮助我,我想在我的网站上下载pdf文件,我该怎么办?



pdf文件已经在服务器上了,所以我该如何使它工作?



请回复,谢谢你。

解决方案

< a href =myDocument.pdf>有什么问题?下载我的文件< / a> ?如果需要按钮,请添加按钮。基本上,没有什么可以编码。



参见: http://php.net/manual/en/function.readfile.php [ ^ ]。



-SA


我已经多次回答了这个问题:)



请按照以下代码:



< pre lang =PHP> <?php
switch(


< blockquote> file_extension )
{
case pdf

Hello,

Kindly assist me, I'm want to put a pdf file for download on my site, how do i go about it?

The pdf file is already on the server, so how do i make it work?

Kindly respond, thank you.

解决方案

What's wrong with <a href="myDocument.pdf">Download my document</a>? If you want a button, add a button. Essentially, there is nothing to "code".

See also: http://php.net/manual/en/function.readfile.php[^].

—SA


I have answered this question so many times :)

follow the code:

<?php
	switch( 


file_extension ) { case "pdf":


这篇关于如何编码下载按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆