Speed Posted September 29, 2006 Report Share Posted September 29, 2006 Kads man nevaretu paskaidrot kaa ar php var kko ierakstit txt failaa ??? Link to comment Share on other sites More sharing options...
andrisp Posted September 29, 2006 Report Share Posted September 29, 2006 http://lv2.php.net/manual/en/function.fwrite.php Link to comment Share on other sites More sharing options...
IM24LV Posted September 29, 2006 Report Share Posted September 29, 2006 un ne tikai to tev vajadzēs... nav nemaz tik vienkārši es teikšu... pats tikai tagad cenšos ierubīties kā viss strādā... Link to comment Share on other sites More sharing options...
bubu Posted September 29, 2006 Report Share Posted September 29, 2006 eta kak nav vienkārši? 1) atveram failu 2) ierakstam tekstu 3) aizveram failu Kura no šīm trīs rindiņām nav vienkārša? Link to comment Share on other sites More sharing options...
IM24LV Posted September 29, 2006 Report Share Posted September 29, 2006 es domāju visu pārējo uztyaisīt :P pašas galvenās funkcijas jau ir vienkārši uzrakstamas, bet lai pirmkārt būtu forma kas to visu izdara un pārējais... tu jau to visu zini, tev tas vienkārši :P man tā ir kā ķīmija Link to comment Share on other sites More sharing options...
blackhalt Posted September 30, 2006 Report Share Posted September 30, 2006 Pilna lapa tekstiem:" <?php $a="teksts\n"; $fp=fopen('mans.txt','a'); fwrite($fp,$a); fclose($fp); ?> Link to comment Share on other sites More sharing options...
Speed Posted September 30, 2006 Author Report Share Posted September 30, 2006 nu nez kas tur tads sarezgits man vis sanaca :) Link to comment Share on other sites More sharing options...
IM24LV Posted September 30, 2006 Report Share Posted September 30, 2006 a kaa panaakt lai ieraksta nevis faila beigaas bet gan saakumaa? vai arii lai lasa no beigaam. Link to comment Share on other sites More sharing options...
bubu Posted September 30, 2006 Report Share Posted September 30, 2006 Palasi par otro fopen parametru. Link to comment Share on other sites More sharing options...
IM24LV Posted September 30, 2006 Report Share Posted September 30, 2006 hmm, es nomainiiju "a" ar "x", bet tad man vinsh neko neizmaina, un kad meegjinu pievienot tekstu, paraada erroru: Warning: fopen(komentari/2.txt) [function.fopen]: failed to open stream: File exists in C:\wamp\www\komenti.php on line 12 Link to comment Share on other sites More sharing options...
Stopp Posted September 30, 2006 Report Share Posted September 30, 2006 ak dies, nu paskaties to tabulu pie http://php.net/fopen un saproti, kāda katram burtam nozīme. x uztaisa jaunu failu, kurā rakstīt. lai ierakstītu faila sākumā, paņem faila saturu mainīgajā, tad failā ieraksti, ko gribi + bijušo faila saturu. Link to comment Share on other sites More sharing options...
Orion7 Posted October 2, 2006 Report Share Posted October 2, 2006 a kaa panaakt lai ieraksta nevis faila beigaas bet gan saakumaa? vai arii lai lasa no beigaam. http://lv2.php.net/fseek fseek($fc, 0); // vai rewind($fc); Pārvieto kursoru uz sākumu fseek($fc, SEEK_END); // Pārvieto kursoru uz beigām Link to comment Share on other sites More sharing options...
Recommended Posts