Reply
Ignore included file not found and show the rest of the page?
Old 05-08-2009, 10:48 AM Ignore included file not found and show the rest of the page?
Novice Talker

Posts: 9
Trades: 0
Hi there,

I have page I created.. and this is one part of its code...


So this are just plain txt files that I want to include on my page, right..

Code:
<!--#include file="sms1.txt"-->
<!--#include file="sms2.txt"-->
<!--#include file="sms3.txt"-->
<!--#include file="sms4.txt"-->
<!--#include file="sms5.txt"-->
Now the thing is, not all of these txt files are always on server, and that is ok to be... So for example I can sometimes have situation where file sms4.txt is not found on server... I will not go in further explaining why, but it's the way it is and the way it should be...

Now what I want is if sms4.txt is not on server, I want to show the included content of other txt files, and make full asp page viewable in the browser even without missed included txt file and want sms4.txt to be skipped...

Rather than that, in reallity if there is not sms4.txt file I get error 0126 file on page view, which tells me that included file sms4.txt is not found on server...

So how do I make page shown and other txt files included, and page to works even if any of other txt files are missed from server?


Tnx!
Error404 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 05-13-2009, 03:42 AM Re: Ignore included file not found and show the rest of the page?
nayes84's Avatar
Super Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 139
Name: John
Location: Tokyo
Trades: 0
try adding the following code before including the files
Code:
<%
	On Error resume Next
%>
__________________
Upload Your Photos For Free | Submit Website To ePhoto Bay
ASP VS JSP
| Free Online Galleries
If I'm("Helpful") Then Add_Talkupation("nayes84") End If
nayes84 is offline
Reply With Quote
View Public Profile Visit nayes84's homepage!
 
Old 05-31-2009, 08:03 AM Re: Ignore included file not found and show the rest of the page?
Novice Talker

Posts: 9
Name: zobin lee
Trades: 0
Quote:
Originally Posted by nayes84 View Post
try adding the following code before including the files
Code:
<%
	On Error resume Next
%>
If the error occur with the include file not found ,it seems that the error can't be resumed.
dopanel.com is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Ignore included file not found and show the rest of the page?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11118 seconds with 13 queries