News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Abou Kone's Blog:
Set up JSON action output in CakePHP 1.3
October 07, 2011 @ 08:45:00

Abou Kone has a recent post to his blog showing the CakePHP users out there how to set up JSON output for your actions in a few simple steps.

Working on setting up the Rest Plugin for CakePHP helped me realize that i wanted to set up JSON output for some of my actions. This way, if you request for example "www.yourapp.com/app/post/view/1.json" in the url, you will be returned the JSON post data. This excellent tutorial here will help you achieve it.

Changes include updates to configuration for routing, using the RequestHandler component and setting your actions to output the data correctly when the ".json" is detected on the request.

0 comments voice your opinion now!
json output cakephp tutorial configure framework


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Create Advanced Facebook Apps with Facebook JavaScript

Hasin Hayder's Blog: RSA Encrypting and Decrypting data with Zend_Crypt_Rsa Library

Utah PHP Users Group: CodeIgniter - the PHP answer?

Klaus Graefensteiner's Blog: Two ways to test for prime numbers in PHP: Sieve and File

Kowser's Blog: Kohana Tutorial: For the beginners


Community Events

Don't see your event here?
Let us know!


configure api application interview symfony laravel yii2 php7 community composer part2 project framework language podcast opinion introduction list example series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework