首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

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

2013-06-26 
如何让数据库字段中的php代码运行?如何让数据库字段中的php代码运行?[解决办法]抄了个例子,你看看?php$st

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

怎么让数据库字段中的php代码运行
[解决办法]
抄了个例子,你看看

<?php
$string = "beautiful";
$time = "winter";

$str = 'This is a $string $time morning!';
echo $str. "<br />";

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


输出结果:

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

热点排行