Re: Subdomain as parameter
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
On Aug 17, 2012, at 11:19 PM, Reza Talamkhani <reza.talamkhani@gmail.com> 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 cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home