ASP Include files

J

JD

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
 
J

JD

Thanks again for the reply Mike. I have changed the line
to read

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

which works but I cannot access my small access database.
It seens that although my ISP web hosting service
supports ASP they do not allow database connection
----
"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."
 
G

Guest

This is because your host has disabled a feature called
Parent Pathing. This is the feature that allows ..'s to
work on the server. Hosts frequently disable this
features because in some cases, you can use it to
navigate into the server's file system where you
shouldn't be going.

The solution is to use forward paths only, such as
admin/config.asp
or absolute paths, like
/myweb/admin.config.asp

Fortuantely, this has no effect on ..'s you code in
regular URLs, because the browser resolves those
instances.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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


Top