有人可以解释一下为什么我会收到以下错误吗?
从以下目录中,我正在运行“python -m SimpleHTTPServer”
[blah@blah:~/Dropbox/bootstrap]: ls
css img index.html js
当我在浏览器中访问 localhost:8000/时,出现以下错误:
127.0.0.1 - - [16/May/2014 10:22:37] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [16/May/2014 10:22:37] code 404, message File not found
127.0.0.1 - - [16/May/2014 10:22:37] "GET /%E2%80%9Djs/bootstrap.js%E2%80%9D HTTP/1.1" 404 -
是的,在 js 目录中,我有两个文件“bootstrap.js”和“bootstrap.min.js”
我的index.html 文件如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My First Bootstrap Project</title>
</head>
<body>
<div class="container">
<h1><a href="#">Bootstrap Site</a></h1>
</div>
<link rel=”stylesheet” href=”css/bootstrap.css” type=”text/css”/>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src=”js/bootstrap.js”></script>
</body>
</html>
最佳答案
我认为您的问题可能与您在 HTML 中使用的弯引号(智能引号)有关。相反,请使用常规引号:
regular: "
curly (smart): ”
关于python - SimpleHTTPServer 404 消息找不到文件(尝试加载 bootstrap.js),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23701173/