Brackets - 实时预览不工作 [英] Brackets - Live Preview not working

查看:2462
本文介绍了Brackets - 实时预览不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这个真棒程序(html编辑器)称为Brackets,它是由Adobe。
现在为什么我得到编辑器是因为我想实时预览PHP代码,但我发现后来我需要一个Wamp服务器。



现在,我在做一个关于页面的心情,但我不能实时预览。实时预览基本URL是空的,当我尝试实时预览时,我得到这样:> http://puu.sh/aDkET/ 4209ec1192.png <和闪电是半个橙色(我听说它需要红色工作)。我尝试了很多...输入作为实时预览基本URL到http(分号)// localhost:(insertporthere)/< - Wamp服务器,只尝试localhost,留空,我不知道如何使这个工作..我被卡住了,我基本上需要真正的预览..



请帮助我! D:我搜索过互联网寻找解决方案,但没有。如果可以,一个分步教程将非常感谢:)



亲爱的,
- PiguFilms


< div预览Base URL是与您项目的根文件夹对应的本地主机URL。 Brackets使用它来从磁盘上的本地路径映射到为同一文件提供服务的服务器URL:它采用HTML文件相对于项目根目录的路径,将相对路径追加到基本URL,然后启动生成的完整URL



因此,例如:




  • 如果您的网页 http://localhost/myapp/page.php 并且page.php文件位于项目的myapp子文件夹中,您的基本网址只是 http:// localhost /

  • 如果您的网页位于 http://localhost/myapp/page.php 并且page.php文件在项目的根目录中,基本URL是 http:// localhost / myapp /



如果您认为您的Base网址设置正确,但仍然不是工作中,请尝试在浏览器中手动转到相同的网址,以确保您的服务器正常运行。



可以找到有关使用实时预览与您自己的本地服务器的更多详细信息这里: https://github.com/adobe/brackets/wiki/如何使用支架#lp-custom-server


I found this awesome program(html editor) called Brackets and it's by Adobe. Now reason why i got the editor was because i wanted to Live Preview PHP code, but i found out later that i needed a Wamp Server.

Now, i was in the mood of making an about page but i couldn't live preview. Live Preview Base URL is empty, and when i try to live preview, i get this: > http://puu.sh/aDkET/4209ec1192.png < and the lightning bolt is half orange(i heard it needs to be red to work). I have tried the lot... Entering as Live Preview Base URL to http(semicolon)//localhost:(insertporthere)/ <-- Wamp Server, tried only localhost, left it empty, I don't know how to make this work.. I am stuck and i basically need real preview..

Please, please help me! D: I have searched the internet looking for solutions, but no. If you can, a step-by-step tutorial would be much appreciated :)

Kind regards, - PiguFilms

解决方案

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 file's 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 it's 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.

这篇关于Brackets - 实时预览不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆