Carabiner 1.4: Asset Management Library |
[eluser]tonydewan[/eluser]
@dnyce Off the top of my head, I'm thinking you could do something like this: Code: $dev = ($_SERVER['SERVER_NAME'] == 'localhost') ? TRUE : FALSE; In my case (local MAMP install on OSX), the $_SERVER['SERVER_NAME'] var returns 'localhost'. From what I can tell, that should be pretty standard value if your developing locally, but I can't say for sure. If that particular server var isn't set, I would check some of the others. If that syntax looks weird, check out the php.net page on the ternary operator. But, all I'm doing is setting a variable to true or false based on the value of $_SERVER['SERVER_NAME']. You'd obviously still need to pass that value into the config method for Carabiner. I hope that helps. |
Welcome Guest, Not a member yet? Register Sign In |