G
G
g3rmes2017-04-15 13:42:36
PHP
g3rmes, 2017-04-15 13:42:36

How to make browserSync work with php?

Hello everyone, I can not force the page to be updated when changing php.
galpfile (netology.dev is a host on openserver, added manually, the path netology.dev/php is registered inside it, where the php file itself is stored):

var gulp         = require('gulp'),
    browserSync  = require('browser-sync').create();

gulp.task('server', function() {
  browserSync.init({
  	proxy: "netology.dev/"
  });
});

gulp.task('watch', function()
{
  gulp.watch('php/*.php', browserSync.reload);
});

gulp.task('default', ['server', 'watch']);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question