输入banner图图片脚本导航/分类

怎么让数据库字段中的php代码运行

如何让数据库字段中的php代码运行?
如何让数据库字段中的php代码运行?

分享到:


------解决方案--------------------
抄了个例子,你看看

$string = "beautiful";
$time = "winter";

$str = 'This is a $string $time morning!';
echo $str. "
";

eval("\$str = \"$str\";");
echo $str;
?>


输出结果:

This is a $string $time morning!
This is a beautiful winter morning!