Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]file_get_contents() wywala błąd, Was ist das?
Kloc
post
Post #1





Grupa: Zarejestrowani
Postów: 115
Pomógł: 8
Dołączył: 8.06.2014

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


Cytat
Warning: file_get_contents(pliczek.txt): failed to open stream: No such file or directory in http://localhost/plik.php


funkcja file_get_contents() wypluwa mi taki błąd i nie wiem o co chodzi. Plik o nazwie pliczek.txt nie istnieje i funkcja zamiast go stworzyć to wypluwa błąd.

  1. <?Php
  2.  
  3. $file = file_get_contents('pliczek.txt');
  4. var_dump($file);
  5.  
  6. ?>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




Cytat
w manualu pisze, że użycie jej jest równoznaczne z wywołaniem fopen, fwrite i fclose.

Wskaz mi prosze palcem gdzie to jest napisane

ps: Ty mylisz ze sobą te dwie funkcje
http://pl1.php.net/file_get_contents
http://pl1.php.net/manual/en/function.file-put-contents.php
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 6.10.2025 - 02:08