I stand corrected!
Bad habits die('hard');
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving ema
@vanja
you should NEVER use die() in your code.
bad idea - makes it impossible to test
always use response class and a simple `$this->autoRender = false`
This will also not render any templates, but the clean way.
It will also make the reponse class respon with the appropriate headers -
in this c
Also, you should do a die(); after you echo the vCard data, otherwise
CakePHP will render the regular HTML layout template around your vCard data.
What you *should* do is register an .vcf extension in your app and make a
proper Layout and Views to handle .vcf requests, handle the headers, etc..
Use the response class to set the headers from the controller:
http://book.cakephp.org/2.0/en/controllers/request-response.html#CakeResponse::type
Am Donnerstag, 22. August 2013 13:45:58 UTC+2 schrieb Adrian Tello:
>
> The header tags should be used in the controller, not in the view.
> El 20/08/
The header tags should be used in the controller, not in the view.
El 20/08/2013 22:25, "Gray McCord" escribió:
> I've been using PHP for a while, but am new to Cake. What I am attempting
> to do is create a vCard on the fly in a PHP variable and download it to a
> client. To do that, I need to
I've been using PHP for a while, but am new to Cake. What I am attempting
to do is create a vCard on the fly in a PHP variable and download it to a
client. To do that, I need to set the response header to something like
"Content-Type: text/x-vcard; charset=utf-8" and then add a
'Content-Dispos