J
Jan Faerber
Hello!
php is better than frames. So I tried something with php.
Now I have this problem that when I have an index.php file
with an image like <img src="images/pic.png">, I have this code
in an /includes folder e.g. a file header.php with:
'
....
<img src="images/pic.png">
....
'
and I make in the index.php file a statement like this:
'
....
<?php
include header.php;
?>
....
'
I don't know if the syntax is 100% correct now but anyway
I want to do the same with a file in another location -
/en/index.php ... so, here the location of the images is not
the same relative to the location of the 'main' index.php file.
The browser can not find the images because they are
found now in '../images/' and not in '/images/'.
So my question is:
How can I use the same include files
but with different levels of folders when I want to use
only one folder for images for instance.
First I solved this problem by using absolute paths
in the 'header.php' file e.g. <img src="http://213.47.90.11/images/pic.png">
but that seems not to be the best way it can be done.
ty
php is better than frames. So I tried something with php.
Now I have this problem that when I have an index.php file
with an image like <img src="images/pic.png">, I have this code
in an /includes folder e.g. a file header.php with:
'
....
<img src="images/pic.png">
....
'
and I make in the index.php file a statement like this:
'
....
<?php
include header.php;
?>
....
'
I don't know if the syntax is 100% correct now but anyway
I want to do the same with a file in another location -
/en/index.php ... so, here the location of the images is not
the same relative to the location of the 'main' index.php file.
The browser can not find the images because they are
found now in '../images/' and not in '/images/'.
So my question is:
How can I use the same include files
but with different levels of folders when I want to use
only one folder for images for instance.
First I solved this problem by using absolute paths
in the 'header.php' file e.g. <img src="http://213.47.90.11/images/pic.png">
but that seems not to be the best way it can be done.
ty