The constant I was looking for wasn't in the list. But I managed to
make one using the link I messaged before

Absolute path ->

$proj = str_replace(str_replace('url=', '', $_SERVER['QUERY_STRING']),
'', $_SERVER['REQUEST_URI']);
$abs_path = "http://{$_SERVER['SERVER_NAME']}{$proj}';"

its suppose to output

http://localhost/b2/

then I'll just add the controller and action to end of $abs_path.


If there is a better way to get the path or a better way to pass the
URL in mootools Request.HTML please do reply here. For now, I'll be
using this one.

Thanks S!

On Jun 10, 2:03 pm, Sam Sherlock <[email protected]> wrote:
> Yeshttp://book.cakephp.org/view/122/Core-Definition-Constants
>
> - S
>
> 2009/6/10 eiji <[email protected]>
>
>
>
> > But doesn't $this->action only gets the action, eg. in my example add/
> > edit?
>
> > I was wondering is there a way in cakephp, a constant variable
> > perhaps, that gets the absolute path of a certain project?
>
> > Alec
>
> > On Jun 10, 12:22 pm, Sam Sherlock <[email protected]> wrote:
> > > this->action is good for this. I find it useful setting a js var in a
> > script
> > > block and then in my main script eg common.js I use this var - also this
> > > controller
> > > - S
>
> > > 2009/6/10 eiji <[email protected]>
>
> > > > Hi Sam,
>
> > > > Thanks for that, is there an easier way to get the absolute path of a
> > > > certain project?
>
> > > > or is this the best way ->
> > > >http://groups.google.co.uk/group/cake-php/browse_thread/thread/e40c3c.
> > ..
>
> > > > Thanks. :)
>
> > > > On Jun 10, 11:22 am, Sam Sherlock <[email protected]> wrote:
> > > > > use absolute urls in cake
>
> > > > > - S
>
> > > > > 2009/6/10 eiji <[email protected]>
>
> > > > > > bump..
>
> > > > > > Has no body encountered this with Cakephp + Mootools?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to