[php] wykonywanie kodu

0
$kod = '<? echo "15"; ?>';
echo $kod;

czy istnieje mozliwosc, aby kod $kod zostal wykonany

0

funckja eval();

<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "\n";
eval("\$str = \"$str\";");
echo $str. "\n";
?>

Rezultat: 

This is a $string with my $name in it.
This is a cup with my coffee in it.

1 użytkowników online, w tym zalogowanych: 0, gości: 1