FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Little test AP functions
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Little test AP functions
Posted: Tue Jan 04, 2022 08:10 AM
Little test AP functions
Code (fw): Select all Collapse
function main
    local cTest := "my Test"
    
    ? "--------------------------------------"
    ? "AP_Body()  Returns the request body as a string"
    ? AP_Body()
    ? "--------------------------------------"
    
    ? 'AP_Method()  returns "GET" or "POST" according to the client request'
    ? AP_Method()
    ? "--------------------------------------"
    
    ? "AP_FileName() --> cFileName  returns the filename.prg provided to Apache by the client"
    ? ValToChar(AP_FileName())
    ? "--------------------------------------"
    
    ? "AP_GetPairs() --> Hash   returns a hash with all GET pairs, key and value "
    ? ValToChar(AP_GetPairs())
    ? "--------------------------------------"
    
    ? "AP_Args() --> cArgs  returns the args provided to Apache by the client if any "
    ? ValToChar( AP_Args() )
    ? "--------------------------------------"
    
    
    TEMPLATE PARAMS cTest
    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
    <h1>This is a heading</h1>
    <p>This is a paragraph.</p>
    <a href="#?test=<?prg return cTest ?>">Pasa variable <?prg return cTest ?></a>
    </body>
    </html> 
    
ENDTEXT

return 

//----------------------------------------------------------------------------//
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Little test AP functions
Posted: Sat Jan 08, 2022 09:09 AM
Dear Otto,

You may add:

AP_PostPairs() --> Hash returns a hash with all POST pairs, key and value

More:
https://github.com/FiveTechSoft/mod_harbour/wiki/Functions-provided-by-the-mod-Harbour
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Little test AP functions
Posted: Sat Jan 08, 2022 04:05 PM
Dear Antonio,
Thank you. I add it.
I made a little program with mod harbour - GENESIS - and TINY document management. Text is stored to DBF file.
Furthermore, I use this now for documenting mod development.
When I have the HTML viewer ready. I will put online the link to this knowledge base.

Although you made it straightforward for us, there is still a lot to learn and discover and to remember. Therefore, I write it down for me.
Thank you again for mod harbour.

Best regards and have a nice Sunday
Otto


Continue the discussion