[FX.php List] Tracking the web activity

Erik Andreas Cayré erik at cayre.dk
Sat Nov 18 05:44:33 MST 2006


Den 18/11/2006 kl. 10.53 skrev Gjermund Gusland Thorsen:

> using
> ---
>
> if( $_REQUEST['debug'] == 1 ) {
> print_r( $_REQUEST );
> }
>
> is OK if you are actively working on the site; developing.
>
> However when the client is using the solution by themselves,
> I typically use something like:
>
> 	$q = new FX( $serverIP, $serverPort );
> 	$q->SetDBData( $db, 'logTheWeb' );
> 	$q->SetDBPassword( $xmlUser, $xmlPass );
> 	$q->AddDBParam( 'IP', $_SERVER["REMOTE_ADDR"] );
> 	$q->AddDBParam( 'browser', $_SERVER["HTTP_USER_AGENT"] );
> 	$q->AddDBParam( 'script', basename( $_SERVER 
> [ "SCRIPT_FILENAME" ] ) );
> //	$q->AddDBParam( 'webSESSION', var_export( $_SESSION ) );
> //	$q->AddDBParam( 'webREQUEST', var_export( $_REQUEST ) );
> 	$rLog = $q->FMNew();
>
> However you might see that I commented out two lines,
> what I would really like is to put the arrays of current
> working data into the log as well... but it just does not work :-(
>
> Anyone got a clue to how I can put visually hierarchical arrays(
> similar to the ones of print_r ) into a FileMaker field without
> flattening them?


try

> 	$q->AddDBParam( 'webSESSION', var_export( $_SESSION, TRUE ) );
> 	$q->AddDBParam( 'webREQUEST', var_export( $_REQUEST, TRUE) );



 From the docs on var_export():

mixed var_export ( mixed expression [, bool return] )

Returns the variable representation when the return parameter is used  
and evaluates to TRUE. Otherwise, this function will return NULL.



---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach




More information about the FX.php_List mailing list