PlaintextController.php 496 B

123456789101112131415161718192021222324
  1. <?php
  2. App::uses('AppController', 'Controller');
  3. class PlaintextController extends AppController {
  4. public function index() {
  5. $this->autoRender = false;
  6. header("Content-type: text/plain");
  7. echo 'Hello, World!';
  8. /*
  9. * Because this test is focused on routing we don't involve the view.
  10. *
  11. * Normally we would create a template file index.ctp containing "Hello, World!"
  12. * in app/View/Plaintext and:
  13. *
  14. $this->autoLayout = false;
  15. $this->response->type('text');
  16. */
  17. }
  18. }