fow www.john.com $_SERVER['SERVER_NAME'] is john.com $site = $this->Website->findByDomain($_SERVER['SERVER_NAME']); ...
On Sep 2, 9:29 pm, "Fernando Z. Bob" <[email protected]> wrote: > Hello everyone. > My name is Fernando. I`m from Brazil. > This is my first message in the group. I have one question about > cake-solutions. > > Let me explation what i mean. > > Imagine that i have the table Websites which contains 5 fields. > id int(5) > name varchar(100) > domain varchar (255) > country varchar(50) > stylesheet varchar(40) > > Lets consider also, that i have 3 rows in the table (actually, the table > will have thousands of lines), but its only an example: > id name domain country stylesheet > 1 PAUL http://www.paul.com BRASIL 31.css > 2 JOHN http://www.john.com USA 9.css > 3 JACK http://www.jack.com CANADA 322.css > > In my system, i have installed my cake like this way (imagine windows only > for example - my app will be placed in a linux). > > c:\cake [this is the core] > c:\www\allsites [this is the app folder] > > Let me say also that all domains (paul.com, john.com, jack.com) points to > the same folder (c:\www\allsites) > So, very easy to understand. Now is my question: > When the visitor comes into whatever site, is cake able to load information > from the database according to the typed URL? > > I mean: if i typewww.john.comor john.com is that possible to do something > that recognizes the URL and retrive all the Websites table information and > all the related table only from id number 2 (which is john) and place the > stylesheet 9.css into the rendered page? > > Has someone done any system like that which has only one app folder for many > sites at the same time? > > This system will receive thousands of visits per day. > > Thank you > Fernando --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
