Skip to content

Instantly share code, notes, and snippets.

@jlamim
Last active November 30, 2016 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlamim/008e8a0c3e1bc82111f89f32e9c3a1e4 to your computer and use it in GitHub Desktop.
Save jlamim/008e8a0c3e1bc82111f89f32e9c3a1e4 to your computer and use it in GitHub Desktop.
Live CodeIgniter 4 - HTTP Response
<?php
use CodeIgniter\HTTP\Response;
$response = new Response();
$response->setStatusCode(Response::HTTP_OK);
$response->setBody($output);
$response->setHeader('Content-type', 'text/html');
$response->noCache();
// Sends the output to the browser
$response->send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment