Recargar archivos PHP en el navegador usando Visual Studio Code
Fuente: https://stackoverflow.com/questions/60678203/is-it-possible-to-use-live-server-for-php-with-autoreload-on-save
For having auto reload in PHP files in Visual Studio Code:
- Install Live Server extension.
- Install PHP Server extension.
- Config PHP Server: (PHP Config Path), (PHP Path).
- Install Google Chrome Live Server extensions.
- Open your PHP file in Visual Studio Code and 'Click to run Lie Server'.
- Copy the opened page address and past it in "Live Server Address" in live server chrome extension and click Apply.
- Switch again to Visual Studio Code and right click on your PHP file and click on "PHP Server: Reload server", it will open your PHP file in browser and just copy IP and port (for example: http://localhost:3000) and paste it on "Actual Server Address" in live server of Google Chrome extension and click apply.
- Turn On live Reload in live server of chrome extension. Now whenever you run your PHP file with "PHP Server: Reload server", it will reload automatically on each saving.
Note: For having good experience of automatically reload active Autosave and set 400ms for its delay.
Comentarios
Publicar un comentario
Incluye información que aporte al tema