I have a simple question. If I write a php file that will result in echoing another correct php statement, will this be executed? For instance:
<html>
<body>
<?php echo "hello: "."<?php echo '1';?>"; ?>
</body>
</html>
Will this ever produce the output: Hello: 1 ?
I would have said no, but if I run this under Apache, the “inner echo” gets “sanitized” as <!--?php echo '1';?-->, which leads me to believe it could.
Thanks!
Thanks God it doesn’t. In order to execute a string you should (not) use
eval():