dipende da cosa vuoi fare nello specifico ma quasi sicuramente devi vedere header()

google: php header() download file