我回音了一个iframe:PHP eval函数中的iframe
<iframe width='100%' height='100'>$content</iframe>
$content = eval ("\$bugs = \"" . gettemplate ('bugs') . "\";");
,但它不工作。
我该如何使用PHP的eval函数来显示iframe中的页面?
thnx!
我回音了一个iframe:PHP eval函数中的iframe
<iframe width='100%' height='100'>$content</iframe>
$content = eval ("\$bugs = \"" . gettemplate ('bugs') . "\";");
,但它不工作。
我该如何使用PHP的eval函数来显示iframe中的页面?
thnx!
请参阅下面的代码
<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "\n";
eval("\$str = \"$str\";");
echo $str. "\n";
?>
究竟为什么你想在这里使用eval? (你似乎试图使用$内容,然后分配任何数据给它,这是不会做任何有用的) – Quentin 2010-03-18 09:16:41
并且“使用src'属性”在iframe中显示页面“。 iframe元素的子节点是不支持或禁用帧的替代内容。 – Quentin 2010-03-18 09:34:24