如何使我们的文件可通过PHP下载给用户 [英] How to make our files downloadable to users in PHP
本文介绍了如何使我们的文件可通过PHP下载给用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在托管一个网站,我想在其中建立一个界面,用户可以在该界面中上载和下载文件.我已经完成上传,但是我不知道如何使用PHP下载文件.请帮我解决这个问题.
I am hosting a website in which i want to make an interface in which user can upload and download files. I have done upload, but i dont know how to make files downloadable in PHP. Please help me out with this.
推荐答案
以下代码是从我自己的软件中为您复制的:)
below code is copied from my own software for you :)
session_start();
require_once('webapp/lib/globalfunctions/common.function.php');
function ShowFileName(
文件路径) { preg_match(' /[^?] */',
filepath) { preg_match('/[^?]*/',
文件路径
这篇关于如何使我们的文件可通过PHP下载给用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文