PDA

View Full Version : how to control the picture file.


NinjaTurtle
10-24-2002, 08:02 AM
dear,

example:
The web root is "Project",
there are many asp files and images store in this directory, then there is a folder called "Images" store all the image files,so when i want to use the image file, i just need to write the file source "Images/abc.JPG", i have a include file called "footer.asp" that shared by all ASP file, the include file contains 1 image file that is from "Images" folder, the source named "Images/abc.JPG", but how if 1 of the ASP need to share the "Footer.asp" file which inside another folder call "Share", the images source should be "../images/abc.JPG", rite?

That's mean i need to have two sets of "footer.asp" in the root "Project"????

raf
10-24-2002, 09:02 AM
Ninja turtle,
Wow, complicated. If i got i right, you indeed need two foother-includes. Or you should create a separate folder (say : /footer) were you stall all the files you need for the footer.

You can then use this one include (also stored in /footer) were all adresse only contain the filename (since all is in the same directory). You then only have to modify the adress to the include.
if for example, the asp is in the root, then the include will look like

<!--#include file='footer/footer.inc'-->

if the asp is in a subfolder, the include will look like

<!--#include file='../footer/footer.inc'-->

NinjaTurtle
10-24-2002, 09:06 AM
yes u r rite, ur suggestion is what i did now. So, i found that's not convinient to me, now i want to know how professional people like u all cater this kind of problem....

raf
10-24-2002, 09:19 AM
Well, i simply never use footers. in fact, i just looked for the first time at the footer on this site (to see if there is one)

why is it not convenient for you to store it all in a seperate directory (if i may ask)?

NinjaTurtle
10-24-2002, 09:27 AM
ok, example, i only have store 2 footer of include files rite? so when any changes of the footer i need to do twice of changes, rite?

how about i have 2, 4 , 6 ,8 of include files? so i need to do many times of duplicate job just bcos of the PATH problems.

whammy
10-27-2002, 01:37 AM
Ok, I think I understand you - your path problems can be solved simply by storing the footer in ONE place, and referencing it using include virtual:

<!-- #include virtual="/subfolder/filename.ext" -->

the first / represents your root folder.

:)