here is an idea, hope it helps :
<?php
class BusinessesController extends AppController {
protected function _getSubDomain() {
$url = explode('.', $_SERVER['HTTP_HOST']);
return $url[0];
}
public function index() {
$subDomain = $this->_getSubDomain();
…………………...
}
Andras Kende
http://www.kende.com
On Aug 17, 2012, at 11:19 PM, Reza Talamkhani <[email protected]> wrote:
> Hi;
> I need to get subdomain as a parameter in CakePHP...
>
> Please help me how to sent subdomain as parameter to controllers...
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.