Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/272.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
Php 查找图像文件夹_Php_Html_Image_Path_Directory - Fatal编程技术网

Php 查找图像文件夹

Php 查找图像文件夹,php,html,image,path,directory,Php,Html,Image,Path,Directory,好吧,我很抱歉问这个问题 但这令人沮丧,我找不到答案 无论如何,我正在使用WAMP和PHPstorm运行Localhost 我的问题是,我不知道如何到达images目录,在您尝试回答之前,让我为您映射一下 因此,我的根文件位于我的桌面上: 根目录:圣诞节列表 文件夹:php -index.php -header.php 文件夹:图像 -santa.png 文件夹:上传 现在,当我向index.php文件添加img标记时 <img id="site_logo" src=

好吧,我很抱歉问这个问题

但这令人沮丧,我找不到答案

无论如何,我正在使用WAMP和PHPstorm运行Localhost

我的问题是,我不知道如何到达images目录,在您尝试回答之前,让我为您映射一下

因此,我的根文件位于我的桌面上:

根目录:圣诞节列表
文件夹:php -index.php
-header.php

文件夹:图像
-santa.png

文件夹:上传

现在,当我向index.php文件添加img标记时

 <img id="site_logo" src='images/santa.png' alt='The Santa Logo' >

它在浏览器中显示为断开的图像图标

我该怎么做

我是一个初学者(没有$H!T,但目前正在做这个)

对于未来和现在的新秀/业余爱好者和精疲力尽的人来说

" src="../images/image.png">"
试试这个-

src='../images/santa.png'


它的作用是-'将您带到父目录,然后尝试查找“images”文件夹。

尝试src='../images/santa.png'?我爱您(:我读过的所有书籍,所有教程,但从未提及过。谢谢!!我已将其作为答案发布。您可以将其标记为已接受,以供其他人了解。