On Nov 21, 3:56 pm, "Louie Miranda" <[EMAIL PROTECTED]> wrote:
> I am a bit experimenting on how to randomize an image and display it via
> cakephp, but not sure if my approach is correct.
>
> I have here a link that will display an image
> (random):http://www.louiemiranda.net/about/background
Which outputs this:
http://bin.cakephp.org/view/478743132
"The view for <em>AboutController::</em><em>background()</em> was not
found.</p>"
>
> However, it won't show up.
>
> My code on the controller is pretty much simple.
>
> <?php
> class AboutController extends AppController {
> var $name = 'About';
>
> function background() {
> header("Content-type: image/gif");
> header('/img/bgrandom/web_splash'.rand(1,2).'.gif');
> }
>
> }
>
> ?>
>
> When accessing the background, it would randomize into two different file
> using 1 and 2. However, I am hitting a wall. I figured, maybe cakephp is
> loading something I didn't knew yet. -- so the browser could not understand.
Well, you aren't disabling the normal rendering process - and you are
redirecting which won't work in ie anyway.
>
> Any ideas?
Use MediaView ;)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---