All,
I work on my site on my local machine, which when saved, it is synced to the
live web server. I don't have a "temp" site in between. All my edits are
basically live. Sometimes I want to echo stuff to the screen so I can see
what's there, etc. but I don't want anyone else during my testing to see it.
This is what I came up with:
function debug($debugvar ) {
$ip = $_SERVER["REMOTE_ADD R"];
if($ip == "10.1.1.1")
{
echo $debugvar;
}
}
then whereever I need to see something, I call this:
instead of echo $secvalue; I would use debug($secvalue );
without setting up a testing site, is this the best way to approach this ?
Thanks.
I work on my site on my local machine, which when saved, it is synced to the
live web server. I don't have a "temp" site in between. All my edits are
basically live. Sometimes I want to echo stuff to the screen so I can see
what's there, etc. but I don't want anyone else during my testing to see it.
This is what I came up with:
function debug($debugvar ) {
$ip = $_SERVER["REMOTE_ADD R"];
if($ip == "10.1.1.1")
{
echo $debugvar;
}
}
then whereever I need to see something, I call this:
instead of echo $secvalue; I would use debug($secvalue );
without setting up a testing site, is this the best way to approach this ?
Thanks.
Comment