ZumbaJr
asked on
PHP eval with img src
Hi Experts!
I´m looking for a way to render objects from database like this:
<?php
$v = '<img src="teste.png" />';
eval($v);
?>
but it doesn't works fine.
Any idea?
Thanks in advance.
I´m looking for a way to render objects from database like this:
<?php
$v = '<img src="teste.png" />';
eval($v);
?>
but it doesn't works fine.
Any idea?
Thanks in advance.
ASKER
I´m sorry!
I have some code php into database var like this:
<?php
$v = '<img src="<?php echo $rootfolder; ?>/teste.png" />';
???
?>
I have some code php into database var like this:
<?php
$v = '<img src="<?php echo $rootfolder; ?>/teste.png" />';
???
?>
http://php.net/manual/en/function.eval.php
The code string to be evaluated. code_str does not have to contain PHP Opening tags.
The code string to be evaluated. code_str does not have to contain PHP Opening tags.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<?php
$v = '<img src="teste.png" />';
echo $v;
?>