bubu Posted November 12, 2004 Report Posted November 12, 2004 Tikai plz bez xml :/ plzzz :unsure: A kur bija xml?
Faplo Posted November 12, 2004 Author Report Posted November 12, 2004 (edited) hmm tad ka galu galaa vinam jaizskataas <_< Btw ja vins paraxta failu tuksu :/ Edited November 12, 2004 by Faplo
Faplo Posted November 12, 2004 Author Report Posted November 12, 2004 Man izdevas <? $faila_vards = 'texts.txt'; $faila_saturs = htmlspecialchars(file_get_contents($faila_vards)); if (isset($_POST['submit'])) { $str = $faila_texts.'lol'; $faila_v = fopen("$faila_vards", "w"); fwrite($faila_v, $str); fclose($faila_v); echo'gatavs'; } echo'<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; echo'<textarea name="faila_texts" cols="100" rows="40">'. $faila_saturs .'</textarea>'; echo'<input type="submit" name="submit" value="Save">'; echo'</form>'; ?> :rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes:
Faplo Posted November 12, 2004 Author Report Posted November 12, 2004 man jautajums kapec nestrada sis : <? function yea($fnamez) { $faila_vards = $fnamez; $faila_saturs = htmlspecialchars(file_get_contents($faila_vards)); if (isset($_GET['submit'])) { $str = $faila_texts; $faila_v = fopen("$faila_vards", "w"); fwrite($faila_v, $str); fclose($faila_v); echo'gatavs'; } else { echo'<form action="'.$_SERVER['PHP_SELF'].'" method="get">'; echo'<textarea name="faila_texts" cols="100" rows="40">'. $faila_saturs .'</textarea>'; echo'<input type="submit" name="submit" value="Save">'; echo'</form>'; } } yea('texts.txt') ?> vins neieraxta failaa infu tip to pasu veco atgriez :/
рпр Posted November 12, 2004 Report Posted November 12, 2004 function yea($fnamez) { // prieksh kam defineet liekus mainiigos? $faila_saturs = htmlspecialchars(file_get_contents($fnamez)); if (isset($_GET['submit'])) { // nezinu kaa tev serveris nodefineets, bet pareizaaks mainiigos lasiit no $_GET vai $_POST $str = $_GET['faila_texts']; // "$fnamez" == $fnamez $faila_v = fopen($fnamez, 'w'); fwrite($faila_v, $str); fclose($faila_v); echo'gatavs'; } else { echo'<form action="'.$_SERVER['PHP_SELF'].'" method="get">'; echo'<textarea name="faila_texts" cols="100" rows="40">'. $faila_saturs .'</textarea>'; echo'<input type="submit" name="submit" value="Save">'; echo'</form>'; } } yea('texts.txt');
bubu Posted November 12, 2004 Report Posted November 12, 2004 Iepriekš tev bija kods: lasam/rakstam failu taisam echo formu a tagad ir kods: lasam failu if (nosuutiiti dati) { rakstam failu } else { taisam echo formu } Atšķirās tak bišķi, ne?
Faplo Posted November 13, 2004 Author Report Posted November 13, 2004 Kapec sis scp textam pirms " liek / ziimi ka beigaas iznaak /" ;)
bubu Posted November 13, 2004 Report Posted November 13, 2004 Bļin, tu vienreiz sāksi rakstīt normālus teikumus? Paskaidrojot, kas, kur nestrādā! Nevis pasakot tikai, ka nekas nestrādā!!! Kas ir šis scp? Kādam tekstam? Un kas ir tās beigas?
Faplo Posted November 13, 2004 Author Report Posted November 13, 2004 nu blje tip sitam gala rezultatam kad tu saglaba failu spiezot Save ja taja faila ir zimes " vins tam prieksa pieliek \"
bubu Posted November 14, 2004 Report Posted November 14, 2004 Kas ir gala rezultāt? Kur tas rezultāts uzrādās? Kādu Save?
Faplo Posted November 14, 2004 Author Report Posted November 14, 2004 Bubu tu vispar lasi kas sitaja topica notiek? :D vajag palasiit ieprieksejosPOSTUS un tad runat :angry:
bubu Posted November 14, 2004 Report Posted November 14, 2004 Nu ko var padarīt, ka es tāds neattīstīts domāšanā padevies...
Venom Posted November 15, 2004 Report Posted November 15, 2004 nu blje tip sitam gala rezultatam kad tu saglaba failu spiezot Save ja taja faila ir zimes " vins tam prieksa pieliek \" sk. stripslashes() bēdu bērns
Recommended Posts