Reply to How to include optonial info when running on local server?

Your name:

Reply:


Posted by Christian Aastorp on 08/31/07 21:45

I'm a newbie with php, but experienced with other languages. I'm
maintaining a small site written in php. To ease debugging and updates
I've used an onscreen reference to indicate identity of included files
etc.

I don't really want this reference to be visible to anyone but myself.
So I searched the manual and found some promising predefined variables
that I used in this code snippet:

<?php
if ($_SERVER['REMOTE_ADDR'] = "127.0.0.1") {
echo $level1, '_', $level2, '_', $imageNO, ' ', $display;
}
?>

This worked spllendidly when I tested running our site locally using
the XAMPP-bundle. But when I copied the code out to the real server it
seems that all clients are found at 127.0.0.1!

I'm sure there are lots of better ways both to fix my code, and
especially totally different ways to do what I'm trying to achive, any
suggestions very welcome!

--
Christian Aastorp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация