Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t在html中显示图像。授予的所有权限和正确的路径_Html_Image_Path_Permissions_Apache2 - Fatal编程技术网

Can';t在html中显示图像。授予的所有权限和正确的路径

Can';t在html中显示图像。授予的所有权限和正确的路径,html,image,path,permissions,apache2,Html,Image,Path,Permissions,Apache2,几天前,我在LinuxMint18上安装了一个LAMP服务器。在localhost/prueba.html上浏览一个简单的html测试文件时,我试图用显示一个.jpg文件,浏览器将只显示“name”,而不显示图像。奇怪的是,所有权限都被授予/var/www/html(我保存文件prueba.html和name.jpg的路径),当我浏览localhost/name.jpg时,图片显示没有问题 <img scr="name.jpg" alt="Name" > prueba.html和

几天前,我在LinuxMint18上安装了一个LAMP服务器。在localhost/prueba.html上浏览一个简单的html测试文件时,我试图用显示一个.jpg文件,浏览器将只显示“name”,而不显示图像。奇怪的是,所有权限都被授予/var/www/html(我保存文件prueba.html和name.jpg的路径),当我浏览localhost/name.jpg时,图片显示没有问题

<img scr="name.jpg" alt="Name" > 
prueba.html和name.jpg文件位于同一文件夹中。它们都具有授予的所有权限,并且可以被www数据访问

<img scr="name.jpg" alt="Name" > 
以下是html代码:

<!DOCTYPE html>
<html>
        <head>
        </head>
        <body>
                <img scr="name.jpg" alt="Name" >  
        </body>
</html>
<img scr="name.jpg" alt="Name" > 


<img scr="name.jpg" alt="Name" > 

你有一个打字错误-
scr=“”
而不是
src=“”
你是对的。真是个白痴,谢谢你。