note 45840 rejected from function.fopen by betz
| From: | betz@php.net | Date: | Tue, 21 Sep 2004 09:09:08 +0000 |
| Subject: | note 45840 rejected from function.fopen by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77093@lists.php.net to get a copy of this message | ||
Note Submitter: info at lapeonza dot com
----
Can you help me??? i have this code for download.
please email-me the answer thanks!!!!
//////////////////////
<?php
$file="archivo.php";
header("Content-type: application/octet-stream\n");
header("Content-Disposition: attachment; filename=\"$file\"\n");
header("Content-transfer-encoding: binary\n");
header("Content-length: " . filesize("$file") . "\n");
$fp=fopen("$destino/$file", "r");
fpassthru($fp);
?>
////////////////////
ERRORS HAVE:
---------------
<br />
<b>Warning</b>: fopen(): open_basedir restriction
in effect. File(/archivo.php) is not within the allowed
path(s):
(/home/httpd/vhosts/lapeonza.com/httpdocs:/tmp)
in
<b>/home/httpd/vhosts/lapeonza.com/httpdocs/php/archivos/
bajatelo.php
</b> on line <b>9</b><br />
<br />
<b>Warning</b>: fopen(/archivo.php):
failed to open stream: Operation not permitted in
/home/httpd/vhosts/lapeonza.com/httpdocs/php/archivos/bajatelo.php
<br />
<b>Warning</b>: fpassthru(): supplied argument is not a valid stream resource in
<b>/home/httpd/vhosts/lapeonza.com/httpdocs/php/archivos/bajatelo.php