O
O
Oleg2019-03-14 10:35:58
gulp.js
Oleg, 2019-03-14 10:35:58

How to include files via php include in gulp?

hello everyone,
I'm trying to build a site using gulp and ran into such a problem that I don't understand how to automatically build a page from parts into final php using php include. I found plugins for galp, but I can't figure out the syntax, namely how to set the settings so that galp includes files that are written
in this way <?php include 'footer.php' ?>
One of the plugins found by www.npmjs.com /package/gulp-file-include, you can use its example to show how to correctly set the settings for including files via <?php include 'footer.php' ?>.
Or if you have another option, you can drop it by specifying the name of the plugin.
I understand that on pages with the .php extension, the php include function works fine, but I'm trying to make the final assembly of the site without this function, in order to optimize loading speed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2019-03-14
@FanatPHP

gulp has nothing to do with PHP.
PHP is executed on the server
, assembling PHP into a single file will not give any "load speed optimization".
php include should be left alone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question