MM-Y Posted May 19, 2003 Report Share Posted May 19, 2003 Ir fails - 'dati.txt', to includo 'zinjas.php'. 'dati.txt' tiek papildinati ar speciaalu administreeshanas formu, kuraa katrs ieraksts tiek rakstiic jaunaa rindaa. Ja man ir 100 ieraxti, tad 'zinjas.php' ielaade notiek ilgi, taapeec veeleejos zinaat, kaa var izdariit taaa, lai tiek izvilktas tikai 20 rindinjas un izveidots links 'taalaak (20)', kur es varu apskatit naakamos 20, kur ir linki 'atpakalj (20)' un 'talak (20)' utt.. 1) lai izvelkaas 20 rindinjas 2) taakaa ir taada lieta, ka jaunie raxti tiek ieraxtiiti 'dati.txt' beigaas, tad tie tiek nolasiiti ar funkciju <code><font color="#000000"> <font color="#0000CC"><? $fails </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/array_reverse]array_reverse[/url]</font><font color="#006600">(</font><font color="#0000CC">file </font><font color="#006600">(</font><font color="#CC0000">"sakums.txt"</font><font color="#006600">)); while (</font><font color="#0000CC">$val </font><font color="#006600">= </font><font color="#0000CC">each </font><font color="#006600">(</font><font color="#0000CC">$fails</font><font color="#006600">)) { </font><font color="#0000CC">$mas </font><font color="#006600">= </font><font color="#0000CC">[url=http://lv.php.net/explode]explode[/url]</font><font color="#006600">(</font><font color="#CC0000">"|:|"</font><font color="#006600">,</font><font color="#0000CC">$val</font><font color="#006600">[</font><font color="#0000CC">1</font><font color="#006600">]); print (</font><font color="#CC0000">"<tr><td class="</font><font color="#0000CC">virsraksts</font><font color="#CC0000">"><b>$mas</font><font color="#006600">[</font><font color="#CC0000">0</font><font color="#006600">]</font><font color="#CC0000"></b> $mas</font><font color="#006600">[</font><font color="#CC0000">3</font><font color="#006600">]</font><font color="#CC0000"> $mas</font><font color="#006600">[</font><font color="#CC0000">2</font><font color="#006600">]</font><font color="#CC0000"></td></tr>n"</font><font color="#006600">); print (</font><font color="#CC0000">"<tr><td class="</font><font color="#0000CC">teksts</font><font color="#CC0000">">$mas</font><font color="#006600">[</font><font color="#CC0000">1</font><font color="#006600">]</font><font color="#CC0000"></td></tr>n"</font><font color="#006600">); } </font><font color="#0000CC">?> </font> </font> </code> tad ir jaapadomaa, lai tiek izlasiitas peedeejas 20 rindinjas no beigaam piedevaam preteejaa seciibaa 3) vajag izveidot tos linkus 'talak ($zinju_skaits_nakamaja_lapa)' un 'atpakalj ($zinju_skaits_ieprieksheja_lapa'), kuros 'zinju_skaits..' izvadiitos pashi (kautkaa...) ceru, ka doma apmeeram skaidra... un luudzams mineet gatavus php piemeerus, jo man taa veel pashvaki iet... un ja man pateiks, kaut ko tur... izvadi, apgriez, sadali tad lielas skaidriibas ar nebuus.. Link to comment Share on other sites More sharing options...
jannis Posted May 19, 2003 Report Share Posted May 19, 2003 es gan tev ieteiktu vispirms iemaaciities programmeeshanas pamatus, piemeeram, ciklu pielietojumus un tad kjerties klaat php. p.s. arii darboshanaas ar datubaazeem par ljaunu nenaaktu Link to comment Share on other sites More sharing options...
MM-Y Posted May 19, 2003 Author Report Share Posted May 19, 2003 es gan tev ieteiktu vispirms iemaaciities programmeeshanas pamatus, piemeeram, ciklu pielietojumus un tad kjerties klaat php. p.s. arii darboshanaas ar datubaazeem par ljaunu nenaaktu Bet ja datubaazes nav pieejamas? Es prasu konkreeti par txt! Un par to programeshanas pamati vareetu padomaat, bet katraa zinjaa esu kjeries klaat php un ceru to nedaudz apguut... Link to comment Share on other sites More sharing options...
Recommended Posts