I have an html file images.html that shows images in subdirectory "img". It uses relative path to access the images in subdir.

Everything goes wrong when in my index.php I do:

```
require_once("dir1/dir2/images.html");

```

Now the relative path is relative to my index.php, not to dir1/dir2/images.html and I can't see my images. Is there a way I can make the path relative to the **included** file images.html?

**directory structure**

```
index.php
dir1
   dir2
       images.html
       img
           flower.png

```

**index.php**

```
<?php require_once("dir1/dir2/images.html"); ?>

```

**images.html**

```
<img src="img/flower.png" />

```