Bonjour, j'ai une fonction en php qui force le téléchargement d'une image, mais le probléme c'est qu'il me dit que je n'ai pas les permission d'accés
Code :
- function download($filename) {
- header('Content-Type: application/octet-stream');
- header('Content-Disposition: attachment; filename='.basename($filename) );
- header('Accept-Ranges: bytes');
- header('Content-Length: '.filesize($filename) );
- readfile($filename);
- }
|
Forbidden
You don't have permission to access /<br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at c:\www\index.php:24) in <b>c:\www\page\recherchealpha.php</b> on line <b>21</b><br /><br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at c:\www\index.php:24) in <b>c:\www\page\recherchealpha.php</b> on line <b>22</b><br /><br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at c:\www\index.php:24) in <b>c:\www\page\recherchealpha.php</b> on line <b>23</b><br /><br /><b>Warning</b>: filesize(): Stat failed for /photo/d/P-8.jpg (errno=2 - No such file or directory) in <b>c:\www\page\recherchealpha.php</b> on line <b>24</b><br /><br /><b>Warning</b>: Cannot modify header information - headers already sent by (output started at c:\www\index.php:24) in <b>c:\www\page\recherchealpha.php</b> on line <b>24</b><br /><br /><b>Warning</b>: readfile(/photo/d/P-8.jpg): failed to open stream: No such file or directory in <b>c:\www\page\recherchealpha.php</b> on line <b>25</b><br /> on this server.
Apache/1.3.33 Server at 192.168.0.186 Port 80
J'utilise EasyPHP, est ce qu'il faut modifié le fichier de configuration d'apache?
Message édité par mule_panda le 29-08-2006 à 21:58:51