ASP Include Files

  • Thread starter Thread starter John
  • Start date Start date
J

John

Anyone know why this line of code does not work

<!--#include file="../admin/config.asp"-->

When ran it gives a ASP0131 error line 1 The include file
'../admin/config.asp' cannot contain '..' to indicate the parent directory.

I have tried changing the line to:

<!--#include file="htdocs/admin/config.asp"-->
<!--#include file="admin/config.asp"-->

both give a 'ASP 0126' file not found error.

Anyone know the correct syntax to use, and yes I have just started using ASP
so please be gentle.

Thanks for any help

John
 
Your host would have to enable Parent Path for your web site on the server
or you have to use:

<!--#include virtual="/admin/config.asp" -->

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Thanks for the feedback Thomas, but that gives an ASP 0130 error

'file attribute cannot strat with forward or back slash.

John
 
Thanks for all the feedback. I have changed the line to read

<!--#include virtual ="admin/config.asp"-->

which works but I now cannot access my small access database.
It seens that although my ISP web hosting service
supports ASP they do not allow database connection (Linux based server),

quote
----
"With the restrictions on the network ports mentioned
above, you cannot connect to a remote database from your
site. You also cannot upload your own database to our
servers. We're planning to look at offering database
connectivity as a potential future service."
 
John,

On Unix/Linux servers, Access is not supported, you must be hosted on a
Windows IIS server to use. However you can use MySQL if you host provides
that.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ASP 0126 error...include file not found 4
ASP 0126 1
ASP error 0126! 7
Database Interface Wiz Errors 3
include file not found? 2
Errors on .asp 2
Include Database Results 7
ASP file include problem 3

Back
Top