Warning: very outdated question with an awful idea. Storing code, whether it be PHP, javascript or even HTML is never a good idea. Leaving this here only for documentation purposes
Ben bir garip sorun biraz var.
Normally when putting stuff in a database, this will be saved in the way it is. So, if the saved stuff is:
<?php echo "hi!"; ?>
This will just be output as 'hi!' when called.
However, in my case I'm saving plain text into a database. I'm not doing any verifying to check for these codes and I've turned off magic quotes to prevent the stuff from being escaped.
(Php idam edilmelidir böylece tam yüklü ise tabii sayfadan önce) db den veri alma ve bir sayfanın içine koyarak bu safari a? Php etiket ve böylece görünmez (olarak kaynak kodu gösterir en az ) bu çıkış için bir-bilinmemektedir etiketi çünkü.
veri bloğu 'Joomla-ish' şablon kod bir tür oluşur. HTML etiketleri, Stil (css), Javascript blokları ve php orada olabilir. Vs css, js, Stuff gibi çalışır, ancak sunucu taraflı kod yok.
Herhangi bir bu işe almak için ya da neden çalışmıyor nasıl fikir? Veritabanı depolama motoru olarak mySQL ve MyISAM bulunmaktadır. Ben onu saklıyorum alan bir LONGTEXT olduğunu. Ben php5 kullanıyorum (bunun dışında birkaç çözme güvenlik riskleri çok oluşturmaktadır çünkü sihirli tırnak kullanarak w3c sitede hangi devletler bu PHP6 silinecektir kadar iyi bir uygulama değildir).
I eval () kullanarak denedim, ama küçük bir sorun var. eval () işlevi bu php asumes, ancak çoğu zaman bu olmayacak. Çoğunlukla içinde bazı php bloklar ile html olacak.