|
CgiDebugPrint
Writes a message into a log file.
- Syntax
-
CgiDebugPrint Msg
Call CgiDebugPrint(Msg)
Msg - Required text that gets written into the log file.
Remarks
The log file from the previous run gets deleted
the first time CgiDebugPrint gets called during a run.
CgiDebugPrint will not write a message or delete the previous log
unless IsCgiDebugOn is set to True.
The log file gets the same name as the executable but with the extension ".LOG".
Then it goes in the same directory as the executable.
(App.Path & "\" & App.EXEName & ".log")
Example
Const MY_IP = "256.256.256.256"
If Environ(CGI_REMOTE_ADDR) = MY_IP Then
IsCgiDebugOn = True
End If
Call CgiDebugPrint("Started app " & now)
Call LoadRequest
Call CgiDebugPrint("Done loading " & now)
|
ErrorHandler
Sends an HTML page containing a nice message back to the visitor.
- Syntax
-
ErrorHandler AdditionalMsg
Call ErrorHandler(AdditionalMsg)
AdditionalMsg - Optional text that goes in the response page.
Remarks
This command is intended to go in the error trap part of Sub Main.
That way, your visitors get some kind of response if a VB error occurs.
ErrorHandler takes no chances sending the response page.
After the page is sent, it calls the BackupRequest command.
See also: BackupRequest.
Example
Public Sub Main()
On Error GoTo Trap
Call CGI_Main
End
Trap:
Call ErrorHandler
End Sub
|

|
|
|