Skip to content

Commit

Permalink
Merge pull request #285 from Ikke/3.2/fix-1762-userguide-deployment
Browse files Browse the repository at this point in the history
Remove out-of-date index.php example
  • Loading branch information
zombor committed Aug 7, 2012
2 parents c979169 + 3b5bf1f commit bdeee25
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions guide/kohana/security/deploying.md
Expand Up @@ -29,33 +29,3 @@ There are a few things you'll want to do with your application before moving int
'profile' => Kohana::$environment !== Kohana::PRODUCTION,
'caching' => Kohana::$environment === Kohana::PRODUCTION,
));

`index.php`:

/**
* Execute the main request using PATH_INFO. If no URI source is specified,
* the URI will be automatically detected.
*/
$request = Request::instance($_SERVER['PATH_INFO']);

// Attempt to execute the response
$request->execute();

if ($request->send_headers()->response)
{
// Get the total memory and execution time
$total = array(
'{memory_usage}' => number_format((memory_get_peak_usage() - KOHANA_START_MEMORY) / 1024, 2).'KB',
'{execution_time}' => number_format(microtime(TRUE) - KOHANA_START_TIME, 5).' seconds');

// Insert the totals into the response
$request->response = str_replace(array_keys($total), $total, $request->response);
}


/**
* Display the request response.
*/
echo $request->response;


0 comments on commit bdeee25

Please sign in to comment.