-
Notifications
You must be signed in to change notification settings - Fork 45
?prg ... ? support on HTML and HTM files
FiveTech Software edited this page May 27, 2020
·
1 revision
In order to have support on HTML and HTM files do this:
- Create a .htaccess with this content where your HTML/HTM pages are:
AddHandler harbour .html .htm
- Modify apache.prg this way:
if Lower( Right( cFileName, 4 ) ) == ".hrb"
pThread = hb_threadStart( @ExecuteHrb(), hb_HrbLoad( 1, cFileName ), AP_Args() )
else
if Lower( Right( cFileName, 4 ) ) != ".prg"
pThread = hb_threadStart( @Execute(), ;
'Function Main()' + CRLF + ;
' local oTemplate' + CRLF + ;
' TEMPLATE USING oTemplate' + CRLF + ;
MemoRead( cFileName ) + CRLF + ;
' ENDTEXT' + CRLF + ;
'Return nil' + CRLF, AP_Args() )
else
pThread = hb_threadStart( @Execute(), MemoRead( cFileName ), AP_Args() )
endif
endif
Thanks to Cristobal Navarro for this great tip!