Wampserver is an integrated software package for Apache Web servers, PHP interpreters, and MySQL databases developed by the French. Frees up developers to spend their time in a cumbersome configuration environment, freeing up more energy for development.
Directly click on the Local. HTML is statically loaded, and files that need to be loaded dynamically cannot be loaded. The following conditions may occur.
So the use of Wamp local server browsing site, so that the dynamic file can be loaded successfully.
Here to share the problems encountered when configuring Wampsever and how to resolve them:
Whether the server is running correctly
If you can mount it means that the server is functioning properly. (enter localhost in the Address bar: port (or 127.0.0.1: Port) or left-click icon to select ' localhost ')
localhost refers to the computer on which you are located.
In the Windows system it became an alias for 127.0.0.1, and under Unix systems, looking at the NIC configuration would find a way to use localhost as a local loopback, somewhat faster than 127.0.0.1.
In the Hosts file, the IP that the localhost points to is 127.0.0.1 that the relationship can be modified.
viewing, modifying ports
Configure your on-premises environment, add projects, open local sites
项目中是空的,需要手动将要打开的网站放到‘www‘目录中
可以选择输入路径,也可以直接左键选择‘www目录‘打开
将要打开网站的文件夹复制到‘www目录下‘,会发现刚添加的文件夹出现在了项目中。
Tick ' Add localhost in URL '
看似到此已经大功告成,然而再点击进去这些文件夹时会出现如下情况:
可以看到的是URL并不对,我们是想要实现通过web服务器的方式访问这些网站,然而这个明显没达到我们想要的效果,根据提示,我找到了原因。
右键选择‘Wamp Settings‘中将‘Add localhost in url‘选项勾上后再次如上打开项目即可。(记得重新打开一次localhost页面或是刷新一下)
可以看到网站成功地通过web服务器打开了,那些之前提示需要动态加载的文件也成功加载了。
Sprinkle the flowers over! ~200 Success!
▲. See this, I believe you also understand why must have ' Add localhost in URL ' this step. Also guessed that, in fact, directly in the URL to enter the correct URL is also possible, such as http://localhost:8080/data-visualize-chain-master/, the results can be opened.
I hope to be of some help to you.
Wampsever Configure your on-premises environment to resolve open open local site issues