Can somebody tell me how can I access $_SERVER Variables in my views
Actually you can't, use a helper, or assign a instance variable in the controller.
but when i assign $_server to any var in controller it stops displaying the view
@spykid, variables and methods starting with an underscore are supposed to be private by convention.
By default $_SESSION is available on views as $session :) you even use Sintags {session-index?}
hey thanks bermi, but i want to access $_SERVER not $_SESSION...
Oops sorry.
Then you'll need to add in your app/application_controller.php:
function __construct()
{
$this->server = $_SERVER;
}
and in your views use $server
hey, dude you rock.... it solved my problem
1 to 7 of 7