我的网站目录mysite
内含 data(存放class,模板等,需要下载的文件放在data\downloads下面)
html(具体访问的php文件 http://localhost/html/test.php)
我如何下载data中的的文件呢
内含 data(存放class,模板等,需要下载的文件放在data\downloads下面)
html(具体访问的php文件 http://localhost/html/test.php)
我如何下载data中的的文件呢
http://xxx/data/downloads/filename
不就可以了?你到底是想问啥?要是列出目录apache 默认显示文件夹的 直接
http://xxx/data/downloads/
$handle = fopen("../data/downloads/file", "r");
// now you can read contents from the file and do whatever you want with it
?>