Re: Copy Function Errors
| From: | Robert Cummings | Date: | Wed, 16 Jul 2008 20:06:06 +0000 |
| Subject: | Re: Copy Function Errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276932@lists.php.net to get a copy of this message | ||
On Wed, 2008-07-16 at 15:58 -0400, Wei, Alice J. wrote:
> Hi,
>
> I have a snippet of code here:
>
> shell_exec("tar cvf /var/www/html/test/$id/data.tar /var/www/html/test/$id/data");
>
> $file1="http:/www.mysite.com/test/$id/data.tar";
> $file2="http://www.mysite2.com/test/$id/.tar";
>
> copy($file1,$file2);
>
> I got the following error in the access log of the server:
>
> [Wed Jul 16 15:45:57 2008] [error] PHP Warning: copy(http://www.mysite.com/test/145/data.tar)
> [<a href='function.copy'>function.copy</a>]: failed to open stream: HTTP
> wrapper does not support writeable connections. in /var/www/html/beam_calculation.php on line 20
>
> Is there something I could do here to allow my file be "copied" to the remote server?
Use the ftp functions.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP