Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błąd przy otwieraniu linku
wachcio
post
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 17.07.2011

Ostrzeżenie: (0%)
-----


Witam

Chcę za pomocą skryptu PHP otworzyć plik txt na moim serwerze w domu z innego serwera (Home.pl). Serwer jest uruchomiony na Raspberry Pi i jest ustawione przekierowanie portów na wewnętrznym ruterze.

Skrypt PHP:
  1. $filePath_temp = "ftp://82.160.79.52:85/nettemp/temperatury.txt";
  2. $dane = fread(fopen($filePath_temp, "r"), filesize($filePath_temp));
  3. $plik = explode(":", $dane);


Niestety sypie błędami:

Warning: fopen(ftp://82.160.79.52:85/nettemp/temperatury.txt) [function.fopen]: failed to open stream: operation failed in /wachcio/nettemp/index.php on line 17

Warning: filesize() [function.filesize]: stat failed for ftp://82.160.79.52:85/nettemp/temperatury.txt in /wachcio/nettemp/index.php on line 17

Warning: fread(): supplied argument is not a valid stream resource in /wachcio/nettemp/index.php on line 17

Co robię nie tak? Może to wina ustawienia serwera na Raspberry? W przeglądarce link otwiera się normalnie...

Ten post edytował wachcio 11.06.2016, 00:14:43
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 11:05