gunmetal Posted October 29, 2010 Report Share Posted October 29, 2010 Man ir forums un, kā lai es foruma materiālu ievietoju, kurš sastāv no php koda? Piemēram šeit input kods, kurā rakstīts <? if (isset?($_GET[user])){ echo "tuk tuk"; } ?> man wnk nepievieno materiālu ja ir šāds kods, jo laikam uztver php kodu, kurš nesastāv no input. mēģināju ar <code></code> bet tāpat nepievieno. Pat nav ne jausmas, kā var pievienot php kodu kā materiālu, nevis sastāvdaļuno lpp Quote Link to comment Share on other sites More sharing options...
gunmetal Posted October 29, 2010 Author Report Share Posted October 29, 2010 kautvai kā šajā forumā <? if (isset?($_GET[user])){ echo "tuk tuk"; } ?> Pievieno kā materiālu nevis kodu Quote Link to comment Share on other sites More sharing options...
Rincewind Posted October 29, 2010 Report Share Posted October 29, 2010 echo htmlspecialchars('php kods te iekšā'); Quote Link to comment Share on other sites More sharing options...
gunmetal Posted October 29, 2010 Author Report Share Posted October 29, 2010 Nē tu man iedevi kodu, kurš no db izņem PHP kodu, bet man vajag lai ieliek kodu DB Jo kad piespieži pievienot rāda ka pievienoja materiālu taču saturā un DB nekā nav Quote Link to comment Share on other sites More sharing options...
Rincewind Posted October 29, 2010 Report Share Posted October 29, 2010 taču saturā un DB nekā nav Ar ko skatījies? Quote Link to comment Share on other sites More sharing options...
gunmetal Posted October 29, 2010 Author Report Share Posted October 29, 2010 kā ar ko? ar phpmyadmin :D Quote Link to comment Share on other sites More sharing options...
waplet Posted October 29, 2010 Report Share Posted October 29, 2010 ieviet vispirms apstrādājot ar htmlspecial chars Quote Link to comment Share on other sites More sharing options...
Rincewind Posted October 29, 2010 Report Share Posted October 29, 2010 kā ar ko? ar phpmyadmin :D echo $query, copy->paste iekš phpmyadmin, palaid, skaties kas notiek. Quote Link to comment Share on other sites More sharing options...
gunmetal Posted October 29, 2010 Author Report Share Posted October 29, 2010 ieviet vispirms apstrādājot ar htmlspecial chars Kā to saprast? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.