wwScripting::CompileAspScript

Compiles an ASP script template into PRG and FXP files if needed. If the FXP file exists and is newer than the script file, no compilation is performed.

o.CompileAspScript(lcTemplate)

Parameters

lcTemplate
Path to the template to compile. Either a full physical path, or a virtual path (~\Page.wcs).

Example

lcFileName = "~\SomePage.wcs"
* lcFileName = "c:\WebApps\MyWebApp\Web\SomePage.wcs"

lcBasePath = Request.GetApplicationPath()  && root path for application

loScript = CREATEOBJECT("wwScripting")
loScript.lNoVersionCheck = .F.
loScript.lEditErrors = .F.
loScript.lSaveVfpSourceCode = .T.
loScript.lShowFullErrorInfo = .F.	
loScript.cBasePath = ADDBS(lcBasePath)	

IF !loScript.CompileAspScript(lcFilename)  
   *** also oException is set with error props and line info
   lcError = loScript.cErrorMsg 
ENDIF

See also:

Class wwScripting

© West Wind Technologies, 2023 • Updated: 01/24/17
Comment or report problem with topic