Echo Execute PHP Code -
is possible execute php code in echo? need finish work, try seems fruitless; bump either blank browser page or errors.
it not need echo func. here example of code compile. sample nothing flashy. echo example, put more complex , advanced code @ echo's place start simple stuff that.
<?php $code = "<?php echo '123'; ?>" echo $code; ?>
that is....an epic fail catastrophe. whatever reason, i'm answering... need use eval()
. don't it. read here: http://php.net/manual/en/function.eval.php
perhaps need use include 'path/to/file/with/my/code';
. read here: http://php.net/manual/en/function.include.php
based on comments, think you're looking this: echo htmlspecialchars(file_get_contents(__file__));
that display php code ran. search line , remove before displaying. write function @ of included files , add them $variable displayed, using same logic.
Comments
Post a Comment