Tvinky Posted November 3, 2005 Report Share Posted November 3, 2005 Ir iespējams saskaitīt rindiņas iekš faila no otra gala? Link to comment Share on other sites More sharing options...
KAC Posted November 3, 2005 Report Share Posted November 3, 2005 man skjiet ka rindu skaits nemainaas atkariibaa no kura virziena saak skaitiit :D Link to comment Share on other sites More sharing options...
php_Stopp Posted November 3, 2005 Report Share Posted November 3, 2005 ja tu domā rindiņas izprintēt no otra gala, tad $f = file('fails.txt'); $f = array_reverse($f); foreach($f as $rinda) { echo $rinda."<br/>"; } Link to comment Share on other sites More sharing options...
capsx Posted November 3, 2005 Report Share Posted November 3, 2005 Ir iespējams saskaitīt rindiņas iekš faila no otra gala? :]] Link to comment Share on other sites More sharing options...
Tvinky Posted November 3, 2005 Author Report Share Posted November 3, 2005 Tur tā lieta, ka nemainās. Un ja jaunākās ziņas nolasās tagad otrādāk (no apakšas) tad vinš jaunajam linkam caur count dod id=0. Un tad ja veido linku pa kuru tam jāiet, tas vnk ver netās ziņas vaļā spiežot uz linka "Lasīt tālāk". Tur jau tā škrobe.. Brbr, būš tad savādāk jātaisa :( Link to comment Share on other sites More sharing options...
KAC Posted November 3, 2005 Report Share Posted November 3, 2005 tak vienkaarshi linkus veido nevis tikai skaitot no augshas, bet saskaitot visus kopaa un atnjemot to Link to comment Share on other sites More sharing options...
blackhalt Posted November 3, 2005 Report Share Posted November 3, 2005 ~ šitā: <?php // reversi ielasa failu rindas $fs=file('test.txt'); $saiz=count($fs); for($i=$saiz-1;$i>=0;$i--){ echo $fs[$i]; } ?> Link to comment Share on other sites More sharing options...
php_Stopp Posted November 3, 2005 Report Share Posted November 3, 2005 kā tad tev tas id tiek iedots ? ps. vienk raksti failā jau uzreiz jaunākos rakstut pirmos.. Link to comment Share on other sites More sharing options...
Tvinky Posted November 4, 2005 Author Report Share Posted November 4, 2005 kā tad tev tas id tiek iedots ? ps. vienk raksti failā jau uzreiz jaunākos rakstut pirmos.. How? :) Link to comment Share on other sites More sharing options...
php_Stopp Posted November 4, 2005 Report Share Posted November 4, 2005 apskaties savu iepriekšējo tēmu par rakstīšanu failā. simts un vieni piemēri tur bij Link to comment Share on other sites More sharing options...
vladimirs Posted December 17, 2005 Report Share Posted December 17, 2005 stulbuma kalngals. Link to comment Share on other sites More sharing options...
bubu Posted December 17, 2005 Report Share Posted December 17, 2005 vladimir, tev mājās nav kalendārs? Link to comment Share on other sites More sharing options...
vladimirs Posted December 17, 2005 Report Share Posted December 17, 2005 (edited) Nevajag taisīt muļķīgas QUOTEs (bubu) tev vaig? Edited December 17, 2005 by bubu Link to comment Share on other sites More sharing options...
bubu Posted December 17, 2005 Report Share Posted December 17, 2005 Paskaties labāk pats: php_Stopp - 2005. gada 04. Nov 15:35 vladimirs - Šodien, 03:09 Link to comment Share on other sites More sharing options...
vladimirs Posted December 17, 2005 Report Share Posted December 17, 2005 tas ka vecs bazaars man netraucee rakstit piebildiiti.. Link to comment Share on other sites More sharing options...
Recommended Posts