Answer the question
In order to leave comments, you need to log in
How to disable nested code in php?
How to configure php.ini so that the nested script does not work?
So this script:
<?php
$echo = "<?php echo 'some text'; ?>";
echo $echo;
?>
should output "<?php echo 'some text'; ?>", not "some text".
The point was that the code nested in echo was executed because the script itself was not requested directly, but through another script that connected it. That is, in script 1 it was written <?php include('path/to/script2'); ?>.
Answer the question
In order to leave comments, you need to log in
should output "<?php echo 'some text'; ?>", not "some text".
How to configure php.ini so that the nested script does not work?Delete PHP. Then the contents of the script will simply be displayed, as you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question