Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.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 - Fatal编程技术网

如何访问同级文件夹PHP中的图像

如何访问同级文件夹PHP中的图像,php,Php,我必须在index.php上显示targetImage.png,提前谢谢! 这是我的设置: public_html >mobile >>index.php >web >>images/ >>>targetImage.png “./web/images/targetImage.png””./web/images/targetImage.png“”./web/images/

我必须在index.php上显示targetImage.png,提前谢谢! 这是我的设置:

public_html
    >mobile
        >>index.php
    >web
        >>images/
            >>>targetImage.png
“./web/images/targetImage.png”

”./web/images/targetImage.png“

”./web/images/targetImage.png“

”./web/images/targetImage.png”

标准

即使用相对路径。你也可以使用

<img src="../web/images/targetImage.png">

这是一个绝对路径。

一个标准

即使用相对路径。你也可以使用

<img src="../web/images/targetImage.png">

这是一个绝对路径。

一个标准

即使用相对路径。你也可以使用

<img src="../web/images/targetImage.png">

这是一个绝对路径。

一个标准

即使用相对路径。你也可以使用

<img src="../web/images/targetImage.png">


这是一个绝对路径。

/web/images应该检索图像/web/图像应检索图像/web/图像应检索图像/web/图像应检索图像!!谢谢Jason,但是我应该用什么来替换“.”用?什么都没有…在进入web/images之前,你需要它来上一个目录。谢谢Jason,但是我应该用什么来替换“.”用?什么都没有…在进入web/images之前,你需要它来上一个目录。谢谢Jason,但是我应该用什么来替换“.”什么都没有…在进入web/images之前,你需要它来上一个目录。谢谢Jason,但是我应该用什么来替换“.”什么都没有…在进入web/images之前,你需要它来上一个目录。