Re: How to force a 404 error?

2007-06-26 Thread Braindead

@Tarique: Thanks for your help. That was exactly what I was searching
for!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: How to force a 404 error?

2007-06-25 Thread djiize

the simple way:
$this-redirect('qsdfqsdf'); // or whatever non-existent page you want
(/page-doesnt-exist for instance)

notice: only work with DEBUG = 0

On 25 juin, 10:28, Braindead [EMAIL PROTECTED] wrote:
 Hi, I'm using CakePHP for a week now. And now I'm searching for a
 possibility to force a 404 error (and display the 404 error page) in a
 controller when certain conditions are met.

 Is there a possibility or is it not possible?

 Braindead


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: How to force a 404 error?

2007-06-25 Thread Dr. Tarique Sani
On 6/25/07, Braindead [EMAIL PROTECTED] wrote:


 Hi, I'm using CakePHP for a week now. And now I'm searching for a
 possibility to force a 404 error (and display the 404 error page) in a
 controller when certain conditions are met.


   if(!$page)
   {
$this-cakeError('error404',array(array('url'=$shortTitle)));
}


HTH

T

-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---