View Full Version : Include file Link?
Gibson
08-06-2006, 06:39 PM
Hi,
Im having some trouble. I'm using the <!-- #INCLUDE FILE='connect.asp' --> script. The trouble is the code that this script is on is no longer in the same folder, I think its now stored in an SQL database. The page no longer works and i think it is this part that is causing it as it is no longer connecting to the database :(
I have tried using the "http://www.mysite.com/connect.asp" type connection and also i have used the direct server path but it still doesn't work. Can anyone give me a hand?
Many thanks
Joe
BarrMan
08-07-2006, 12:57 AM
Where is the file you want to write the include code is?
for example:
folder1/folder2/file.asp <--- if your file is here and you want to include connect.asp which is located at folder1 you can do this:
<!--#include file="../connect.asp"-->
Gibson
08-07-2006, 09:55 AM
Hi,
thanks for the reply.
The file is on another server if thats any help?
Many thanks
joe
BarrMan
08-07-2006, 02:10 PM
I don't think you can include a file on another server.
Freon22
08-07-2006, 02:22 PM
Nope you can't.
Gibson
08-07-2006, 02:31 PM
Hi again :)
Ahh thats a bummer :'(
Are there any other ways to include ASP files that are outside the site enabling this to work? :)
Thanks for your help so far
Joe
Gibson
08-07-2006, 03:23 PM
Hi again,
I have thought of another idea that may help :)
Is there away i can display my default.asp page (which is the code that currently isn't working) on another site without using Iframes but it will still have to be stored in the SQL database.
For example using the include file script
<!--#include file="C://myroot/default.asp"--> (i know this won't work!)
and it would then display all the content from that page. Is there a script that will do this?
Many thanks
Joe
Freon22
08-07-2006, 07:46 PM
No its the same thing.
Why don't you just code another connect.asp for your site? Also how did your coded pages get on two different servers anyway. Or is it you are trying to hijack someones site? There is something here that I am not getting.
If your database is MySql or Sql then it is its own server, you then connect to the database server from your server. But your connection string is not stored in the database because you have to have the connect string inorder to connect to your the database. :confused: :confused:
Gibson
08-07-2006, 07:58 PM
Hi,
Lol im not hijacking someones site...i wouldn't know where to start!
What it is is:
The company that host me have my all the websites on certain servers and all the SQL database on another(not sure why but they have there reasons)
but whats confusing is that the page that updates the SQL database contains a WYSWIG editor and i think that you have helped me fix one of my probs and that there maybe another that im trying to figure out asi type this!
Anyway i hope that helps :)
Joe
Freon22
08-07-2006, 09:22 PM
Yes that puts a new light on it, the SQL database is a server. Its a database server. Your site connects to the database server with the connection string, from there your querystring calls for the information that you request or updated fields in the tables est.... What seem has may have happen is your connect.asp page has been moved to another folder or has been deleted. So you need to find what folder its in or code a new connect.asp page for your site.
Edit: Here is a site that will show you what your connection string should look like. http://www.connectionstrings.com/
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.