html – Brackets – Live Preview not working

html – Brackets – Live Preview not working

The Live Preview Base URL is the localhost URL that corresponds to the root folder of your project. Brackets uses this to map from a local path on disk to the server URL which serves up that same file: it takes the HTML files path relative to the project root, appends that relative path onto the Base URL, and then launches the resulting full URL in Chrome.

So, for example:

  • If your page is at http://localhost/myapp/page.php and the page.php file is in a myapp subfolder of your project, your base URL is just http://localhost/.
  • If your page is at http://localhost/myapp/page.php and the page.php file is in the root of your project, your base URL is http://localhost/myapp/ (this way the path is /page.php relative to both bases).

If you think you have the Base URL set correctly but its still not working, try going to the same URL manually in your browser to make sure your server is operating correctly.

More details on using Live Preview with your own local server can be found here: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#lp-custom-server.

although @ytpetes answer is the right choice for your problem but you need to do, as i say, first. In simple words, go to file(in Brackets), click open folder and now make the project directory exactly same as your local host server for php files i.e. C:Program FilesAmppswwwphpFiles (i am using Ampps and here phpFiles is a subfolder inside which relies my php file and also html file too). Now you can follow steps shown by ytpete and you are set to live preview of your php file.

html – Brackets – Live Preview not working

If you are using windows try running brackets As administrator, worked for me

Leave a Reply

Your email address will not be published.