Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old January 14th, 2002, 12:16 PM
Jon Wold Jon Wold is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Oslo, Norway
Posts: 9 Jon Wold User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Basic ASP question

My problem is simple, yet I am clueless!
I have never, ever worked with ASP, but now I have to, I'm switching from a UNIX to an NT host

Now, I do this with PHP:
Code:
<?
// defines page extensions
$ext = ".htm";
?>
<? 
// includes specified file
if(file_exists("$page$ext")) {
include ("$page$ext");
}
else {
include("404.htm");
}
?>

This means I have all my pages as simple .htm files, with no start or finish, just a table to round it all off.
All those files are then displayed in the framwork of anyfile.php using links like these:
"anyfile.php?page=anyfile"
A file found in a subdirectory can be read like this: "anyfile.php?page=anyfile/anyfile"
To change layouts or whatever, I can merely change anyfile.php

Can the same thing be done with ASP?

Jon

Reply With Quote
  #2  
Old January 16th, 2002, 01:22 AM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 234 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 46 sec
Reputation Power: 9
Talking yup

ya dude, you can check to see if they are there...use a FileSystemObject

Set FSObject =Server.CreateObject("Scripting.FileSystemObject")
Set FolderWhereTheyAre = FSObject.GetFolder("path here")
Set Files = FolderWhereTheyAre.Files

For Each File in Files

FileName = File.Name

Then do your string manipulation...

Next

Set FSObject = Nothing


You can also use FSObject.FileExists

hope this helps


Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Basic ASP question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway