Depends what you want to do - if you want to access internal Cake
elements from your app, I'm not sure if this can be done. If you don't
mind just interacting with the Cake dispatcher (so executing Cake
requests and getting the response), then it's much easier. Afaik there
isn't a really simple, elegant way of doing it, but it is not
difficult.
<?php
$_GET['url'] = 'favicon.ico';
require_once 'C:\wamp\www\cake_posts\app\webroot\index.php';
$cake_dispatcher=new Dispatcher();
$result = $cake_dispatcher->dispatch('/posts/test',
array('return'=>1));
echo $result;
?>
This file, completely external from Cake, will output the response from
the /posts/test action, which will be the /posts/test return value (or
the rendered page if you don't return anything).
The only change you will need to make in cake is to comment out the
page generation time from your app/webroot/index.php (down the bottom),
as if this is output before your dispatcher call then the session
cannot start (due to headers already sent).
If you search for Cake CLI you may find some more info, and something
more elegant.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Cake PHP" 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
-~----------~----~----~----~------~----~------~--~---