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 client can afford > that hardware and it is not always feasable for smaller websites to have all > the equipment.
This is usually solved with a virtual host which has virtually no impact on your system -- but provides countless benefits over having a production and test server rolled into one. I don't see why hardware would be an issue. > > So, lets base this on the fact that there is one server that has one URL, > One IP and all development/testing is done on the live website. > > Now that I have that out of the way. > > What I am trying to accomplish is a function that can contain code blocks, > like an if statement. Something that would operate like: > > 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") { > %body > } > } > > Where the %body is the actual code represented by 'execute this code only' > above. > > So, the question is, is there a way to create a function like an if function > that does not only reply on the arguments between the ( and ) in the > function call? Forgive me if I'm ignorant, but it appears that you've answered your own question in the above example -- the case being that it is indeed possible. Cheers, Rob. -- .---------------------------------------------. | Worlds of Carnage - http://www.wocmud.org | :---------------------------------------------: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul. | `---------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php