我想通過header.php文件顯示與圖像文件相同的目錄。如何顯示通過子目錄PHP文件在超目錄PHP文件中顯示的圖像?
以我的header.php使用< IMG SRC = 「image.jpg的」>顯示圖像, 但我的index.php是子目錄,並使用包括( '../的header.php');。
=== image.jpg
=== header.php
=== new folder
====== index.php
是的,圖像不會顯示這種方式。 因爲在index.php中也會有< img src =「image.jpg」>像我包含的header.php。
無論如何顯示從index.php通過header.php圖像?