Avatar billede jthom Nybegynder
20. december 2004 - 09:45 Der er 1 kommentar

Webfile-viewer tree

Hej,

jeg skal bruge navnet på den fysiske sti til min webfolder hos udbyderen til følgende script...Som I kan se skal der bruges en fysisk sti til siteVARrootDir. Udbyderen sender mig konstant denne sti (er det ikke en virtuel sti?)

- customers/dandialsupport.dk/dandialsupport.dk/httpd.www/ -

Skal scriptet omformuleres eller er der nogen der har en idet om hvordan det kan løses ? Som I kan se skal der anvendes backslashes i siteVARrootDir


Begyndelsen af scriptet....

<%
'# # # # # # # # # #      Configuration variables      # # # # # # # # #

Dim siteVARShowUnderscoreDirs, siteVARrootDir, siteVARbaseURL, siteVARshowXtensions, siteVARrootLabel

'Location of files from a file system point of view
'siteVARrootDir = "c:\inetpub\webasp\WebFileBrowser\files\rootFolder"
siteVARrootDir = "/customers/dandialsupport.dk/dandialsupport.dk/httpd.wwwfile_browser/files/rootFolder"


'From a web server point of view
'siteVARbaseURL = "http://www.webfilebrowser.com/WebFileBrowser/files/rootFolder"
siteVARbaseURL = "http://www.dandialsupport.dk/file_browser/files/rootFolder"

'Tag to show on the root. It doesn't have to be a path, it can be any string
' (i.e. "My Files", "Contents of server", etc.
' Note: this will become a JavaScript string; in order to show the reserved
' character \ in the page, we have to "escape" it by preceeding with another \
siteVARrootLabel = "DanDial Support"

'File types to be included in list; add or remove as needed
'If you want to show all files, regardless of type, use siteVARshowXtensions = "*"
siteVARshowXtensions = "PDF,TXT,ZIP,HTML,HTM,ASP,PHP,JSP,GIF,BMP,JPG,DOC,XLS"

'Hides the annoying directories created by IIS
siteVARShowUnderscoreDirs = false 'set to true to show them

' The script needs to be configured in two ways: it needs to know where
' in the file system it should start looking for the files (server-side),
' and it needs to know how the same files can be loaded into a browser
' (client-side).
'
' Example to help you test and troubleshoot:
' Suppose a file exists at this file system path:
'
'        siteVARrootDir\subdir1\filenameA.pdf
'
' Then both the value of siteVARbaseURL and the configuration of your http
' server must guarantee that this page can be loaded in a browser (try
' it manually by replacing the variable with the appropriate value
' and typing it on the browser address):
'
'        siteVARbaseURL/subdir1/filenameA.pdf
'
' Notes:
'    About siteVARrootDir
'            1) uses backward slashes only
'            2) it can be any valid file system path, including remote
'                machines such as \\remotemachine\users\user1\myddocs
'            3) does not need and should not have a '\' at the end
'    About $siteVARbaseURL
'            1) uses forward slashes only
'            2) should include the protocol (http://..., etc.)
'            3) does not need and should not have a '/' at the end
Avatar billede bobbedude Nybegynder
22. december 2004 - 13:32 #1
lave en fil der hedder test.asp og smid dette kode ind i den



<TABLE BORDER="1">
<TR><TD><B>Server Variable</B></TD><TD><B>Value</B></TD></TR>
<% For Each strKey In Request.ServerVariables %>
<TR><TD> <%= strKey %> </TD><TD> <%= Request.ServerVariables(strKey) %> </TD></TR>
<% Next %>
</TABLE>
Example
The following example uses the Request object to display several server variables:
<HTML>
<!-- This example displays the content of several ServerVariables. -->
ALL_HTTP server variable =
<%= Request.ServerVariables("ALL_HTTP") %> <BR>
CONTENT_LENGTH server variable =
<%= Request.ServerVariables("CONTENT_LENGTH") %> <BR>
CONTENT_TYPE server variable =
<%= Request.ServerVariables("CONTENT_TYPE") %> <BR>
QUERY_STRING server variable =
<%= Request.ServerVariables("QUERY_STRING") %> <BR>
SERVER_SOFTWARE server variable =
<%= Request.ServerVariables("SERVER_SOFTWARE") %> <BR>
</HTML>



Så får du stin til din mappe
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester