🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #220323

Re: Zdalny upload z jednego serwera na drugi

#220323
From: Diabół
Date: Thu, 27 Aug 2009 05:19
30 lines
1554 bytes
Chmiel pisze:
>> Hm... jak do tej pory zdołałem sklecić coś takiego:
>>
>> <?php
>> $fp = fopen("url.txt",'r');
>>  while($zdalny_plik=fgets($fp))
>>  {
>> print($zdalny_plik);
>> print ("<br>");
>> $nowy_plik = substr($zdalny_plik,-9); //pobiera nazwe pliku
>> print ($nowy_plik);
>> print ("<br>");
> 
> $handle = fopen($zdalny_plik, "r");
> $contents = fread($handle, filesize($zdalny_plik));
> fclose($handle);   
> 
> $fp = fopen($nowy_plik, 'w');
> fwrite($fp, $contents);
> fclose($fp);
> 
> 
>>
>>  } fclose($fp);
>>     ?>
>>
> 
> Powinno działać. Nie sprawdzałem.

Dzięki, ale wywala się na $handle = fopen($zdalny_plik, "r");
Technical Details
Message-ID: <h7551v$mbm$2@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
References: <h7186a$s0t$1@news.onet.pl> <h72cf5$tpp$1@node1.news.atman.pl> <h72sqe$hl4$1@news.onet.pl> <h7308e$tl$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
From: Diabół <don_ciccio@onet.eu>
Newsgroups: pl.comp.lang.php
Subject: Re: Zdalny upload z jednego serwera na drugi
Date: Thu, 27 Aug 2009 07:19:56 +0200
Organization: http://onet.pl
Lines: 30
Message-ID: <h7551v$mbm$2@news.onet.pl>
References: <h7186a$s0t$1@news.onet.pl> <h72cf5$tpp$1@node1.news.atman.pl> <h72sqe$hl4$1@news.onet.pl> <h7308e$tl$1@node1.news.atman.pl>
NNTP-Posting-Host: 94.254.247.32
Mime-Version: 1.0
X-Trace: news.onet.pl 1251350399 22902 94.254.247.32 (27 Aug 2009 05:19:59 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Thu, 27 Aug 2009 05:19:59 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
In-Reply-To: <h7308e$tl$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit