I have a root directory with 1 subdirectory(myphoto), and 2 files.
Inside the myphoto subdirectory, I have 1 html page and another image.
Root dir:
<myphoto>
01.jpg
watermark.php
myphoto:
indexpage.html
01.jpg
Inside indexpage.html, I have a link like this, which calls the
watermark.php in the root directory and passes it a parameter of a
filename.
<a href="../watermark.php?src=01.jpg" target="">my watermarked
image</a>
However, in this case, watermark.php is passed the 01.jpg which is in
the root directory.
Instead of this, I want it to be passed the 01.jpg from the myphoto
subdirectory. I can solve the problem easily if I code in the absolute
path, but I want
to stay with relative paths, since I may change directory names quiet
often.
How can I solve this problem?