Jee Posted June 25, 2004 Report Posted June 25, 2004 Man ir jautaajums! Piem, es txt failaa ierakstu vaardu un tekstu. Un ja shajaa tekstaa man vajag ierakstiit kaadu linku uz citu webadresi. Kaa var to linku izdabuut araa, lai priekshaa neraadiitos mana adrese?
hu_ha Posted June 25, 2004 Report Posted June 25, 2004 bljins, nu tak pasaki normaali, ko tu gribi pateikt! kur priekshaa linkam tev raadaas tava adrese, ko tu tur mdrii etc?!
DelNet Posted June 25, 2004 Report Posted June 25, 2004 Godigi sakot Kaiminj Jee es ari nesapratu kur ir tava problema...
Jee Posted June 25, 2004 Author Report Posted June 25, 2004 Nu es tajaa tekstaa adresi ierakstu taa <a href="http://jeejee.no-ip.biz">Jee</a> Un man taa adrese raadas taa: http://localhost/\"http://jeejee...biz\" Cerams ka sheit nepaarveertiisies par linkiem.
hu_ha Posted June 25, 2004 Report Posted June 25, 2004 pats no sevis nekas nepārvēršas, tāpēc kaut kur ir kāda maģiska rindiņa, kas to pārvērš. Tāpēc labāk parādi savu kodu, citādāk būs grūti ko pateikt..
Jee Posted June 26, 2004 Author Report Posted June 26, 2004 Es tekstu izlasu shaadi: <?php $cont = "skaits.txt"; $num = file($cont); $num[0]++; $a = $num[0]; $b = "$a.txt"; while($b >=1 ) { if($b != $a++){ $content = file("$b.txt"); while($val = each($content)){ $tmp = explode("|+|",$val[1]); $date = $tmp[0]; if ($tmp[3]==""){ $web = ""; }else{ $web="<a href=\"http://$tmp[3]\" target=\"_blank\">www</a>"; } if($tmp[2]==""){ $vards=$tmp[1]; }else{ $vards="<a href=mailto:$tmp[2]>$tmp[1]</a>"; } echo "<br><table align=\"center\" bgcolor=#ffffff width=98% cellspacing=0 cellpadding=0 border=\"0\"> <tr><td background=\"img/aut.jpg\">$vards $web</td></tr> <tr><td class=\"kal\" bgcolor=#f0f0f0><pre>$tmp[4]</td></tr> <tr><td><p align=\"right\" id=\"date\">$date</td></tr></table>"; } } $b = $b-1; } ?> Es katru rakstu ierakst jaunaa txt failaa!
rumpels Posted June 29, 2004 Report Posted June 29, 2004 varbut vienkarshi shadi?! jo preteja gadijuma Tev izvada web addresi http://tiri piri bet prieksha pieliek vel http:// un ta ka atrodas uz Tava localhosta absoluti vienkarshi pieliek klat localhost un iznak http://localhost/http://jeee.beee.lb if ($tmp[3]==""){ $web = ""; }else{ $web="<a href=\"$tmp[3]\" target=\"_blank\">www</a>"; }
Jee Posted June 30, 2004 Author Report Posted June 30, 2004 nu man vajag, lai to http://localhost nelik priekshaa! Nu tas $tmp[4] ir parasts teksts un, ja ieksh taa teksta ieliek kaadu linku, tad tikai raada to http://localhost priekshaa un man to nevajag!
Recommended Posts