chizijs Posted March 26, 2010 Report Share Posted March 26, 2010 (edited) Kad lietotājas ieraksta kodu inputā, piemēram <? echo "chau"; ?> tad echo parradas nevis parasts melns teksts, bet zils(tipa izkrāso kodu attiecīgās krāsas), un ka ar php palīdzibu to panākt, ja lietotājs vnk ieraksta kodu bez <font.. piemērs http://paste.php.lv/3bb13f17867c51f08486c0c6f212d2a4?lang=php Edited March 26, 2010 by chizijs Link to comment Share on other sites More sharing options...
sandis_m Posted March 26, 2010 Report Share Posted March 26, 2010 (edited) Gribi paste.php.lv kõpiju taisīt? Edited March 26, 2010 by who_i_am Link to comment Share on other sites More sharing options...
chizijs Posted March 26, 2010 Author Report Share Posted March 26, 2010 (edited) Ne, vienkarši uzzinat. Un savā forumā tagā lai būtu krāsains kods Edited March 26, 2010 by chizijs Link to comment Share on other sites More sharing options...
sandis_m Posted March 26, 2010 Report Share Posted March 26, 2010 Tas tavs jautājums tāds nesaprotams. Link to comment Share on other sites More sharing options...
2easy Posted March 26, 2010 Report Share Posted March 26, 2010 (edited) to var izdarīt tikai parsējot kodu. bet labāk dabūt jau gatavu kādu sintakses highlighteri vnkāršākajā gadījumā var arī pats kko darīt ar regulārajām izteiksmēm, bet nju... Edited March 26, 2010 by 2easy Link to comment Share on other sites More sharing options...
chizijs Posted March 26, 2010 Author Report Share Posted March 26, 2010 Tipa if($_POST['input'] == "echo"){ echo "<font color='blue'>".$_POST['input']."</font>"; } ? Link to comment Share on other sites More sharing options...
2easy Posted March 26, 2010 Report Share Posted March 26, 2010 (edited) funkciju keywordiem jau jā, bet tālāk, kad sākas stringi 'bla bla' vai "bla bla" un vēl iekšā var būt parasti eskeipoti apostrofi/pēdiņas \' \", tad pareizi iekrāsot stringu vairs nav tik triviāli ;) sarežģīti jau arī nav, bet nju bik ir jāpakodē... vsp tu jau vari aizņemties kodu no tā paša ipb, kurš lieliski tiek galā ar "chau" iekrāsošanu zaļā krāsā ;) un ar šo arī pareizi tiek galā 'bla\'bla "bla"' Edited March 26, 2010 by 2easy Link to comment Share on other sites More sharing options...
fest Posted March 27, 2010 Report Share Posted March 27, 2010 http://php.net/manual/en/function.highlight-string.php Link to comment Share on other sites More sharing options...
2easy Posted March 27, 2010 Report Share Posted March 27, 2010 nu bet protams! to kas ir degungalā jau pamanīt nevar. gandrīz vēlreiz riteni izgudroju... :D:D:D Link to comment Share on other sites More sharing options...
Recommended Posts