F
F
FrelFrloich2021-10-04 19:50:15
PHP
FrelFrloich, 2021-10-04 19:50:15

How to generate html document from php using js?

Good afternoon, I need to generate html from a php file in full format, directly as php does and is displayed in the browser console. I think it’s quite clear why, but still, I want to typeset in blocks, but when certain pages are completed, generate html, like how a task in gulp from scss does, everything is generated in css.

<?php include("widgets/header.html"); ?>
    <main class="main">
        <?php include("widgets/pages/main.html"); ?>
    </main>
    <?php include("widgets/footer.html"); ?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Pak, 2021-10-04
@PML

PHP generates a template on the server side.
In your code that you are including there is html markup.
The generation approach of the server language is different. Gulp is a package tool that makes it easy to code and implement front-end features.

T
ThunderCat, 2021-10-04
@ThunderCat

open your php page in browser and ctrl+s doesn't work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question