S
S
skasochnoebali2020-04-23 22:43:10
JavaScript
skasochnoebali, 2020-04-23 22:43:10

Why is it displayed as commented out when rendering php code through js on the page?

document.body.innerHTML = `<?php require "footer_shop.php"; ?>`;

Screenshot:
5ea1efc9ae9d8537301808.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-04-23
@skasochnoebali

Because JS can't execute PHP. For JS, PHP code is just text

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question