|
Author |
Message |
billf
Junior WebHelper
Joined: 25 Sep 2007
Posts: 1
|
Posted:
Tue Sep 25, 2007 12:02 pm (16 years, 7 months ago) |
|
I am using JSP and want to use SSI as well. I have small html files for header, footer, etc that are included in the JSPs - these html files can refer to graphics in a common images directory.
As my site grows some pages are in the document root but I want to group others in sub-directories. This causes a problem because a valid path to an image from a page in the document root is not a valid path from a page in a sub-directory - e.g. the header.html cannot refer to "images/banner.jpg" for the index.jsp and "../images/banner.jpg" for the football/westham.jsp
This must be a common situation - what's the solution?
Many thanks,
Bill |
|
|
|
|
scottlpool2003
Junior WebHelper
Joined: 14 Sep 2008
Posts: 3
|
Posted:
Sun Feb 22, 2009 11:21 am (15 years, 2 months ago) |
|
Probably best using php to include the files, that's what I do and it works like a charm. You will need to rename your "header.html" to .php but it won't affect your site.
<? php include"folder/file.php"; ?> |
|
|
|
|
ronzzkee
Junior WebHelper
Joined: 15 May 2009
Posts: 1
|
Posted:
Fri May 15, 2009 4:26 pm (14 years, 11 months ago) |
|
billf wrote: | I am using JSP and want to use SSI as well. I have small html files for header, footer, etc that are included in the JSPs - these html files can refer to graphics in a common images directory.
As my site grows some pages are in the document root but I want to group others in sub-directories. This causes a problem because a valid path to an image from a page in the document root is not a valid path from a page in a sub-directory - e.g. the header.html cannot refer to "images/banner.jpg" for the index.jsp and "../images/banner.jpg" for the football/westham.jsp
This must be a common situation - what's the solution?
Many thanks,
Bill |
thanks for sharing some ideas, i learn something new now..
regards to u,
_________________
Vinyl Banners | My Sports |
|
|
|
|
mazaa
Junior WebHelper
Joined: 28 Sep 2010
Posts: 4
|
Posted:
Tue Sep 28, 2010 7:43 am (13 years, 7 months ago) |
|
Remote file may be processed at the remote server (depending on the file extension and the fact if the remote server runs PHP or not) but it still has to produce a valid PHP script because it will be processed at the local server. If the file from the remote server should be processed there and outputted only, readfile() is much better function to use. Otherwise, special care should be taken to secure the remote script to produce a valid and desired code. |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.145594 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |