To access base URL in controller use
To access base URL in view use
Router::url('/', true);
To access base URL in view use
<?php echo $this->webroot; ?>
Router::url('/', true);
<?php echo $this->webroot; ?>
class ErrorsController extends AppController {
public $name = 'Errors';
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('error404');
}
public function error404() {
//$this->layout = 'default';
}
}