I am using CakePhp 1.2 So, I created a component called Date. I
embedded in my class following the example.
My controller class:
class TradesController extends AppController {
var $name = 'Trades';
var $components = array('Date');
var $helpers = array('Html', 'Form');
function index() {
}
function add() {
$timeStamp = $this->Date->getTimestamp();
print_r($timeStamp);
$this->redirect(array('action'=>'index'));
}
}
I get this error
Warning (2): Cannot modify header information - headers already sent
by (output started at C:\xampplite\htdocs\cake12\app\controllers
\components\date.php:119) [CORE\cake\libs\controller\controller.php,
line 546]
If I uncomment the $this->redirect(array('action'=>'index')), my
component works perfectly fine, and i don't get any error. I try to
comment out the component part, and it works fine. The problem only
occurs when I use my custom component and has the redirect line. Any
clue? Thank you.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---