错误6(net :: ERR_FILE_NOT_FOUND):找不到文件或目录

don*_*rye 4 facebook facebook-like

嗨,我是一名学生,并练习如何使用记事本在简单的html中放置类似的盒子插入代码,这里是我用类似的盒子插入代码编写的简单代码:

<html>
    <head>
      <title>My Great Web page</title>
    </head>
    <body>
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Febitesblog&amp;width=292&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=true&amp;header=true&amp;height=590" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:590px;" allowTransparency="true"></iframe>
    </body>
 </html>
Run Code Online (Sandbox Code Playgroud)

当我尝试在浏览器中执行时,它说:找不到此网页没有找到该网址的网页:

file://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Febitesblog&width=292&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=590
Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found
Run Code Online (Sandbox Code Playgroud)

希望大家能解决我的问题谢谢:)

Igy*_*Igy 7

它失败了,因为//它是协议相对意味着它加载链接/照片/类似框/任何使用用于访问页面本身的相同协议.

  • 通过HTTP(http://)访问页面时,Like Box将包含在HTTP上
  • 通过HTTPS(https://)访问页面时,Like Box将包含在HTTPS中

您正在通过文件协议(file://)访问localhost上的文件- 这意味着它尝试以相同的方式包含Like框,这是无效的,因为您的计算机上没有名为"www.facebook.com"的文件`

立即使用<iframe src="https://...,并将其更改回<ifame src=//...上传到服务器时