Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 01:54 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default correct way of including files.

Till now, I was including files as below.



But in win 2003, entry into parent paths from script is disabled by default. So I cannot use the above one.

The other way is to define a virtual directory for the site and to use it as below.



where vd is the name of virtual directory.

But when the name of virtual directory is changed, we will have to change large number of files. The server is remote and we do not have any control on it. The server admins may transfer files from one machine to another at their wish.

In this situation, may I know, what should be the correct way to include files so that it is possible to move from one server to another without changing the scripts ?
 
Old January 20th, 2005, 08:09 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

In this case,why can't you put the include files you are using in one file and include it in all the pages.When the directory name is changed ,you have to change in only one file.Not in all files.I think this could be easier.

 
Old January 20th, 2005, 09:17 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Thanks for the reply.

But I did not understand your idea. How can I include all the include files related to different modules in a single file ? For e.g. my employee mgmt module contains an employee form. How can I include that in the leave mgmt. module ?

AFAIK, we cannot conditionally include files in ASP. Script runs from top to bottom, go through all include files and produce result.

My problem is : what can I do with the include statement



when the name of virtual directory changes ?
 
Old January 20th, 2005, 09:39 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

I said to put all the include files into an single file locally.So that it could be easier for u to handle the directory name changing issue.But it is not good to include all the files which is not related to the page.Sorry It didnt come in my mind.






Similar Threads
Thread Thread Starter Forum Replies Last Post
including files above site root rinventive PHP How-To 2 August 29th, 2008 03:11 PM
Including Other Project notrosh Visual C++ 1 April 23rd, 2007 12:09 AM
Including activex ashishprem Beginning VB 6 4 January 23rd, 2007 08:07 AM
Including files across folders dsunmedia Beginning PHP 3 July 26th, 2004 04:17 PM
Including same files in different directories jeremy108 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 August 8th, 2003 01:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.