Re: [PHP] Container functions....

2003-08-14 Thread Justin French
Mike, developer_execute() { execute this code only } declare it in an include file or something: execute it anywhere you like: So, the above will execute if your ip address is the same as the one in the function, which seems to be what you want, although I don't like the idea of code relyin

Re: [PHP] Container Functions Continued.....

2003-08-14 Thread David Otton
On Sun, 10 Aug 2003 18:04:00 -0400, you wrote: >First of all, I understand the argument about having a testing, development >and live servers, however, in the real world not every client can afford >that hardware and it is not always feasable for smaller websites to have all >the equipment. The

Re[2]: [PHP] Container functions....

2003-08-14 Thread Tom Rogers
Hi, What about this: if(developer_execute()) { execute this code only } Where the function developer_execute would be defined as: function developer_execute() { if(getenv("REMOTE_ADDR")=="000.000.000.000") return true; return false; } -- regards, Tom -- PHP General Mailing List (

Re: [PHP] Container functions....

2003-08-14 Thread Justin French
Sounds like you're trying to replicated something in ColdFusion? I have a few blocks of code on my pages which are only executed on my development server, not the live server -- is this what you want? if(ereg("192.168.0.",$_SERVER['SERVER_ADDR'])) { $local = 1; } else

Re: [PHP] Container Functions Continued.....

2003-08-11 Thread Robert Cummings
On Sun, 2003-08-10 at 18:04, Mike Morton wrote: > Thanks to everyone who responded to me so far, but I fear that I have not > explained myself too clearly. > > First of all, I understand the argument about having a testing, development > and live servers, however, in the real world not every clien

Re: [PHP] Container functions....

2003-08-11 Thread David Otton
On Sun, 10 Aug 2003 10:50:03 -0400, you wrote: >In a language that I used to program in - for development we used to be able >to make a function that basically just executed everything inbetween: > >Print "This is html printed" Print "this is more >code"; > > >So basically everything in between h

[PHP] Container functions....

2003-08-10 Thread Mike Morton
In a language that I used to program in - for development we used to be able to make a function that basically just executed everything inbetween: Print "This is html printed" Print "this is more code"; So basically everything in between hidecode and /hidecode is executed the same as if the hid

[PHP] Container Functions Continued.....

2003-08-10 Thread Mike Morton
Thanks to everyone who responded to me so far, but I fear that I have not explained myself too clearly. First of all, I understand the argument about having a testing, development and live servers, however, in the real world not every client can afford that hardware and it is not always feasable f

Re: [PHP] Container functions....

2003-08-10 Thread Mike Morton
Justin: Not ColdFusion - ancient language by Brian Fox called MetaHTML - actually a VERY good language - just not supported or developed anymore as far as I can tell ;) Anyhow - that is one solution that I had not thought of - but ideally I would like to use a function rather than an IF statement