A
A
Akcio2016-02-06 17:20:02
JavaScript
Akcio, 2016-02-06 17:20:02

How to set up livereload in browsersync + denwer when changing php files?

There is a task

gulp.task( 'watch', function ()
{
  gulp.watch( sassDir + "**/*.scss", ['sassPostCSS'] );
  gulp.watch( appDir + "*.html", ['html'] );
  BsPHP.watch( appDir + "**/*.*" ).on( 'change', BsPHP.reload );
});

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

When changing any files, brawsersync reloads all URLs in the browser except those that lead to .php files
Example:
site.ru/index.html Reloads
site.ru/test.php1 Reloads
site.ru/test.php Refused

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
r1ch, 2016-02-06
@r1ch

Есть расширение в chrome Live Page, задаешь интервал перезагрузки страницы, он перезагружает любые страницы.

Александр Извеков, 2018-03-16
@Pro100SAny

gulp.watch( appDir + "*.php", ['php'] );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question