I have the same problem. My solution is to build the url using the define FULL_BASE_URL (defined in CAKE/config/paths.php), and $this- >webroot (where $this is a helper or a controller, but not a view), plus a webroot-relative literal. There doesn't seem to be a define for URL directory separators, but webroot has one before and after, like '/ mysite/'.
A view has a property called base which is the same as webroot, without the '/' after. So, in a controller or helper: $url = FULL_BASE_URL . $this->webroot . 'img/user/photos/large'; In a view: $url = FULL_BASE_URL . $this->base . '/img/user/photos/large'; If there's a better way to do this, I'd love to learn. Obviously, one wants a site that transfers smoothly from localhost to a production domain. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
