|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP Include issue
Ive just finished on a site that seemed to work fine when testing locally.
However, when uploading to my hosting (123-reg - the plus package that "supports asp"), none of my includes work. Is this a common problem? I've searched around for a few hours trying to find a solution but to no avail. The includes are for the nav bar (header) and a footer. The code for the include is as follows: <!-- #include file="includes/general_header.asp" --> Please help!! thanks, Mark |
|
#2
|
||||
|
||||
|
-->thread moved to ASP Development
try using virtual. there's a setting in IIS that would need to be changed to allow include file, i can't remember what it is off of the top of my head. Code:
<!-- #include virtual="/includes/general_header.asp" -->
__________________
Come JOIN the party!!! Quote of the Month: Pretension: The downside of being better than everyone else is that people tend to assume you're pretentious. Questions to Ponder: You can be overwhelmed and underwhelmed, but why can't you be simply whelmed? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
Quote:
Hi Thanks for the suggestions, When trying to use 'virtual' i recieve an error when testing locally suggesting the file cannot be found, and when hosting, the same issue occurs...no includes!? |
|
#4
|
||||
|
||||
|
|
|
#5
|
||||
|
||||
|
Just for fun, see if it supports an include of txt file. If it will do that and not an asp file, maybe that would be a clue.
|
|
#6
|
|||
|
|||
|
Also, if you have many "sites" being developed on your PC then this might be useful for you, XP Pro IIS Admin
|
|
#7
|
|||
|
|||
|
Hi All, thanks for the replys
Jonathan8146 - Im only developing the one site at the moment so most likely wont require this? bigmike1212 - I've just tried an include on a txt file with both the 'virtual' and 'file' commands but to no avail? mehere - directory is as follows: Site - JDC ---General -------Images -------Includes ------------Footer.asp ------------Header.asp -------about_jdc.asp -------cdsys.asp -------contact_jdc.asp -------datetimepicker.js -------default.asp -------jdc.css ---Images ---drc_intro.css ---index.htm any help is hughly apprectiated. If you wish to view the source please let me know, i dont want to post a link and break the rules as a new user! thanks again, mark |
|
#8
|
|||
|
|||
|
Quote:
It could be that the server is case sensitive, you have indicated that the folder is called "Includes" but that the include statement uses "includes". |
|
#9
|
|||
|
|||
|
HI,
I've just checked the case, and they both match, the directory list above was manually typed by me. I like you thinking though?! |
|
#10
|
|||
|
|||
|
Quote:
What is the exact code you are trying to use, and in which file, as the code you provided doesn't match the directory/file layout that you gave? |
|
#11
|
|||
|
|||
|
File Include issue in ASP
Hi Buddy
it is very simple if you are inside any of the folder like images folder then call like this <!-- #include file="../includes/general_header.asp" --> or if you are outside the folder the means in the root directory then call like this <!-- #include file="/includes/general_header.asp" --> i think this will solve the problem |
|
#12
|
||||
|
||||
|
based on your directory structure ... try something like this
Code:
<!-- #include virtual="/general/includes/header.asp" --> |
|
#13
|
|||
|
|||
|
Hi All,
Thanks for you help and support... Turns out the code was fine, (always have faith!) More embarassingly, it turned out to be the hosting! When i signed up i chose a windows server, but somehow ended up on linux! hence my issues! Thanks again for all you help and suggestions! Mark |
|
#14
|
||||
|
||||
|
glad you've got it sorted ...
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > ASP Include issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|