发新话题
打印

如何运行嵌在变量中的代码

如何运行嵌在变量中的代码

[php]

$str=
<<<EOT
<p>Hello World!
<p><? echo "Hi, how can I make this php code to run?" ?>
EOT;

[/php]

如何处理以上 $str 变量, 以得到以下 html :

[php]
<p>Hello World!
<p>Hi, how can I make this php code to run?
[/php]      
15 is too short

TOP

echo $str|php -q      
Advance Monitor - Linux Monitoring Solution

TOP

我是指在网页上

index.php
[php]
<?
$str=
<<<EOT
<p>Hello World!
<p><? echo "Hi, how can I make this php code to run?" ?>
EOT;
?>
[/php]      
15 is too short

TOP

这个就不清楚了

作成 cgi 用 php 调用, 不知是否可以满足要求.      
Advance Monitor - Linux Monitoring Solution

TOP

发新话题