Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Include Files
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Include Files

 Post Reply Post Reply
Author
lostcontrol View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote lostcontrol Quote  Post ReplyReply Direct Link To This Post Topic: Include Files
    Posted: 03 May 2006 at 11:39am
I am having a problem with Include files in my website when those files are beeing updated by the site. This causes an "Include file not found" error when people try to access the site at the instance when those files are in the proccess of beeing updated.

I have tried to resolve this problem by using FSO to check whether the file exists before trying to include it. However, this doesn't seem to work and my guess is that ASP tries to include the pages before executing the code.

Has anyone came across a similar situation or have something in mind that could help me check if a file exists before beeing included in the site?

Many thanks
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2006 at 1:58pm
As you suspected, all includes are expanded before anything is processed. This make it impossible to do conditional includes - e.g. "include IF...".

Your particular solution will be to not directly update the include file. Update an edit version of the file and when done close it. Then delete the active include file and rename the edit version.

A delete/rename is quite a bit faster than a file open/edit/close as it only works with directory file indexes instead of with i/o and memory allocation/deallocation.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
lostcontrol View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote lostcontrol Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2006 at 2:48pm
Many thanks for your reply dpyers!

I haven't thought of doing it like this... ill give it a try and see if it resolves this problem.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.