Hi OneNet,
I'm assuming you're using boa ... first check /etc/config/boa.conf ... the DocumentRoot
directive specifies the root directory for your files.
> Added : ../../var/1.bmp (we expect the path is "/var/1.bmp")
Relative path references that begin with ".." are generally a bad idea since there are some
parsing rules that can be confusing.
> but when I browse it , the path of the image is "
http://192.168.1.3/var/1.bmp" (incorrect) !!!
Actually, the URL is correct ... it's just not what you expected or want. Basically, the leading "../" are
removed (sometimes referred to as "removing dot segments").
> It means that when the page is browsed , the default folder is "home" and depeding on
> which protocol (either ftp or http) it will "look at" the appropriate folder.
Yep, but you can make them the same if you want by changing DocumentRoot in the conf file.
> How can I get the correct path of the image (1.bmp) ?
Try using a softlink to the image file in your document root directory (I believe boa will blindly follow
a softlink) then get rid to the blasted "../.." and just use a simple relative path to the softlink like:
link_to_img.bmp
Regards,
--Scott