Error: The requested address '/users/display/game' was not found on
this server.
Moreover all the file extensions are fixed to be zip and I have files
on my disk under gamefiles folder in app folder. On clicking link
three I want game.zip to be downloaded where as on clicking link 2
example1.zip should be downloaded.
My hurdle is that I want to use the above stated download
function(part of media view) to download different files based on the
link clicked by the user and I followed what you suggested in your
first reply to this thread but it seems that due to my limited
knowledge I couldnt get it right, please help me by explaining in a
little more detail.
Thanks
On Feb 4, 8:34 am, cricket <zijn.digi...@gmail.com> wrote:
> On Fri, Feb 4, 2011 at 3:20 AM, newguy <aimanparv...@gmail.com> wrote:
> > In continuation of the previous post:
> > In my site on page display there are 4 links and user clicks on it to
> > download 4 different files. This is the cpt file for this:
>
> > <p>Select the game to download</p>
> > <ul>
> > <li><?php echo $html->link('Game 1',array('action'=>'download')); ?></
> > li>
> > <li><?php echo $html->link('Game 2',array('action'=>'download1')); ?></
> > li>
> > <li><?php echo $html->link('Game 3',array('controller' =>
> > 'users','action' => 'download','slug' => Inflector::slug('game'))); ?
> >></li>
> > <li>Game 4</li>
> > </ul>
>
> > This is my Router::connect:
> > Router::connect('/users/
> > display/:slug',array('controller'=>'users','action'=>'download'),array('slu g'=>'[-0-9a-
> > z]+','pass'=>array('slug')));
> > This file to be downloaded on clicking link three is game.zip
>
> You're getting close. There's no need to call Inflector::slug(),
> though, if you're going to hard-code the file.
>
> So, is this not working?
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment