Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Zapis do pliku
Gibcio
post
Post #1





Grupa: Zarejestrowani
Postów: 48
Pomógł: 0
Dołączył: 20.04.2005

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


Witam!!

Mam takie pytanko jak zapisać dane do pliku w postaci:

$nazwa="strona domowa";
Go to the top of the page
+Quote Post
Amorph
post
Post #2





Grupa: Zarejestrowani
Postów: 309
Pomógł: 0
Dołączył: 6.06.2006
Skąd: include('root/europe/ poland/szczecin.php');

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


Bierzesz myszkę, wybierasz opcję w górnym menu na stronie - SZUKAJ:
Jest tego maaaassssaaaa, leniwcze.
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #3





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Tak jak wszystkie inne dane, ale gdy wpisujesz $nazwa to ujmij ją w apostrofy. Czyli:
  1. <?php
  2. $plik="nazwa_pliku";
  3. $dane='$nazwa="strona domowa";';
  4. file_put_contents($plik, $dane);
  5. ?>


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

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: 19.08.2025 - 14:42