cakephp data getting posted
I have a form and I want to see it in fiddler that what data is getting posted when form is submitted. I am not able to see anything. How开发者_开发百科 do u debug in cakephp. I am a newbie in it
thanks
you must have Configure::write('debug',2);
defined.
then you can use debug($data)
; to debug any data.
also in views or layouts you can have
<?php echo $this->element('sql_dump'); ?>
to output any database queries that had took place.
Inside app/config/core.php make sure the 'debug' value is 1 or 2 . t
If you use 1 warning and errors(if exists) will display If you use 2 warning and errors(if exists) will display and all the sql query will display(that queries are runs on that page)
Within app/config/core.php make sure the 'debug' value is greater than 0.
For any value you would like to see, call the Cake 'pr' function to output it to the page. pr() will automatically expand any nested arrays and data structures.
you have to print data by using
echo "<pre>";
print_r($this->data);
echo "</pre>";
in this,Not required to 'debug' value is 1 or 2 .
精彩评论