使用Firebug查看,发现该请求的状态码为红色的 "aborted"。经过百度说是连接超时,跟浏览器有关,但我换了几个浏览器都是一样的结果。到底是什么原因呢?
PHP中文网2017-04-17 15:22:18
You can debug in the project to determine the problem that occurred at that step
If it is not included in the code at all, it means that the service is not up, or there is a configuration problem
Step by step to eliminate the possibility, be good at debug, hehe
天蓬老师2017-04-17 15:22:18
Open firebug, click on the network request, and see if there are more details in the response?
天蓬老师2017-04-17 15:22:18
Check whether the port is occupied. If so, kill the occupied port
lsof -i:xxxx xxxx is the port
kill -9 PID
高洛峰2017-04-17 15:22:18
Check whether the server is opened successfully
Check whether the port is correct or duplicate
Try using [http://localhost:port number] instead (affected by other programs or software, it is very likely that http://ip:port cannot be accessed)
Check whether the access path is correct (related to the configuration, the reason is that access to a certain directory may only be set, and other directories cannot be accessed, so the url needs to be rewritten)
PHP中文网2017-04-17 15:22:18
I think the front-end should do its job honestly and well. Don’t think that just because node.js can write the back-end, you should think that others’ years of Java back-end reading has been wasted.