我的网站目录mysite
内含 data(存放class,模板等,需要下载的文件放在data\downloads下面)
     html(具体访问的php文件 http://localhost/html/test.php)
我如何下载data中的的文件呢

解决方案 »

  1.   

    你的问题很让人迷惑 什么叫如何下载?如果是下载 那么你直接
    http://xxx/data/downloads/filename 
    不就可以了?你到底是想问啥?要是列出目录apache 默认显示文件夹的 直接 
    http://xxx/data/downloads/
      

  2.   

    fopen?例子:<?php
    $handle = fopen("../data/downloads/file", "r");
    // now you can read contents from the file and do whatever you want with it
    ?>