php implementation

Moderators: Moderator Team, Development Team

php implementation

Postby BHiker on Sun Jan 18, 2004 7:11 pm

For the php implementation, we use:
[php]$id = "username";
define('PPHL_SCRIPT_PATH', '/home/your_domain/htdocs/pphlogger/');
$st = 'php';
include(PPHL_SCRIPT_PATH."pphlogger.php");[/php]This declares and uses variables like [php]$id and $sql[/php]These names could be used elsewhere.
I would prefer that all variables used have a phplogger prefix like:
[php]$pphl_id or $pphl_sql[/php]
BHiker
 
Posts: 13
Joined: Sat Jan 03, 2004 3:52 pm
Location: Belgium

Postby V@no on Sun Jan 18, 2004 7:25 pm

yes, its a good idea.
But its not a big deal to backup needed variables before calling pphlogger:[php]$backup_id = $id;
$backup_$sql = $sql;[/php]
;)
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby BHiker on Sun Jan 18, 2004 11:52 pm

V@no wrote:yes, its a good idea.
But its not a big deal to backup needed variables before calling pphlogger
Hi Vano,
I gave just 2 obvious examples, but I would have to check all the common variables, not very practical.
Also, I like to have PHP warning when a variable is not declared, at least in my test environment.
BHiker
BHiker
 
Posts: 13
Joined: Sat Jan 03, 2004 3:52 pm
Location: Belgium

Postby V@no on Mon Jan 19, 2004 12:40 am

BHiker wrote:Also, I like to have PHP warning when a variable is not declared, at least in my test environment.
perhaps this could help:[php]error_reporting(E_ALL);[/php] :?:
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby sdjl on Mon Jan 19, 2004 1:09 pm

I think having a prefix to defined variables would be a wise idea.
Obviously this would only be relevant/useful to those who call PPHLogger through the PHP or PHP/JS combinations.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby BHiker on Mon Jan 19, 2004 3:34 pm

V@no wrote:
BHiker wrote:Also, I like to have PHP warning when a variable is not declared, at least in my test environment.
perhaps this could help:[php]error_reporting(E_ALL);[/php] :?:

Yes it helps :wink: I mean that I don't get a warning when I forget to declare $sql because PPhlogger does it for me :wink:
BHiker
 
Posts: 13
Joined: Sat Jan 03, 2004 3:52 pm
Location: Belgium

Postby scragz on Sun Feb 15, 2004 11:57 pm

I just had a problem where I was using $dec in one of my scripts and PPHL was overwriting it so I definately vote for prefixing all the variables or putting it all in a class.
scragz
 
Posts: 1
Joined: Sun Feb 15, 2004 11:54 pm


Return to Phlogger3 feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron