PHPee.com PHP development forum
php implementation

 
Post new topic   Reply to topic    phpee.com Forum Index -> Phlogger3 feature requests
View previous topic :: View next topic  
Author Message
BHiker



Joined: 03 Jan 2004
Posts: 13
Location: Belgium

PostPosted: Sun Jan 18, 2004 6:11 pm    Post subject: php implementation Reply with quote
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");
This declares and uses variables like
PHP:
$id and $sql ?>
These names could be used elsewhere.
I would prefer that all variables used have a phplogger prefix like:
PHP:
$pphl_id or $pphl_sql ?>
Back to top
View user's profile Send private message
V@no



Joined: 15 Nov 2003
Posts: 157

PostPosted: Sun Jan 18, 2004 6:25 pm    Post subject: Reply with quote
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;

Wink
_________________
Back to top
View user's profile Send private message Visit poster's website
BHiker



Joined: 03 Jan 2004
Posts: 13
Location: Belgium

PostPosted: Sun Jan 18, 2004 10:52 pm    Post subject: Reply with quote
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
Back to top
View user's profile Send private message
V@no



Joined: 15 Nov 2003
Posts: 157

PostPosted: Sun Jan 18, 2004 11:40 pm    Post subject: Reply with quote
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);
Question
_________________
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 1025
Location: London, UK

PostPosted: Mon Jan 19, 2004 12:09 pm    Post subject: Reply with quote
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
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
BHiker



Joined: 03 Jan 2004
Posts: 13
Location: Belgium

PostPosted: Mon Jan 19, 2004 2:34 pm    Post subject: Reply with quote
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);
Question

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
Back to top
View user's profile Send private message
scragz



Joined: 15 Feb 2004
Posts: 1

PostPosted: Sun Feb 15, 2004 10:57 pm    Post subject: Reply with quote
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.
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    phpee.com Forum Index -> Phlogger3 feature requests All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB
Theme design based on Team 101 Designs, modified by Philip Iezzi