|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 ![]() |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Basic ASP question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|