Yes that is the destination.
http://www.beatlesarama.com/app/views/songs/index.ctp is the actual path.
I have a controller called songs_controller.php
The contents are as follows:
class SongsController extends AppController
{
var $name = 'Songs';
var $helpers = array('Html', 'Javascript', 'Ajax');
// we're not going to use a model for this example, but
// it would be easy to use a database thanks to cake
var $uses = null;
/**
* initial page load
*/
function index() {
$this->get_song();
$this->render('index');
}//index()
/**
* display content action
*
* @param int id of content to display
*/
function get_song() {
$url =
"http://internal.fusionchicago.com/beatles/index.php";
$song = implode('', file($url));
$song = str_replace('<title>Beatles</title>','',$song);
$song = strip_tags($song);
$song = trim($song);
$this->set('song', $song);
}
}
Hope this helps
Glen
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Robert P
Sent: Tuesday, July 07, 2009 6:49 PM
To: CakePHP
Subject: Re: Problems with Routes in 1.2
Perhaps give us an example of what destination you are trying to
achieve, e.g. the route you specified maps to SongsController::display
('index'). We can't really advise you on routing your application
without any knowledge of your controller/action setup.
On Jul 8, 5:54 am, barnent1 <[email protected]> wrote:
> I'm having a problem making a simple route work.
>
> I want the site to go to the URL.
>
> http://www.beatlesarama.com/songs/index/
>
> When putting that page into the browser as seen above the page looks
> perfect.
>
> I setup the route like this:
>
> Router::connect('/', array('controller' => 'songs', 'action' =>
> 'display', 'index'));
>
> With it set this way when I go tohttp://www.beatlesarama.com
>
> I don't get any content.
>
> Thanks for your help!!
>
> Glen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---