Veritabanında php kodu kaydetmek için doğru yolu nedir

3 Cevap php

Veritabanında kod (php, html, js ve mysql) kaydetmek için doğru yolu nedir

3 Cevap

Eğer başka bir bilgi vermedi gibi:

$mycode = '<html>
    <head>
        <title><?php echo $title; ?></title>
    </head>
    <body>
        ...
    </body>';


mysql_query("INSERT INTO table SET mycode = '".mysql_real_escape_string($mycode)."');

Ben ciddi olsa da, bunu yapmak istiyorum şüpheliyim.

D'oh! Eğer bunu yapmak istediğinizden emin misiniz? Bir IDE içinde bu kod ile versiyonu olduğunu ve işin nasıl gidiyor?

Ancak, sadece CLOB sizin DBMS destekler ne olursa olsun onu tutmak için gerçekten meyilli iseniz.

I found this as I was creating something for the enduser to access and alter some php code. and simply include('foo.inc') the field in a page.
This is indeed risky and even though it's in a secure area, I wouldn't normaly try, but he who pays the piper calls the tune.

Ben bir süre için çalışıyor ve kadar hiç almıyorum oldum.