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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -