$this->setContentType($contentType);
}
function setContentType($contentType)
{
$this->contentType = $contentType;
$this->addHeader('Content-Type', $contentType);
}
function addHeader($key, $value){
$this->headers[$key] = $value;
}
/**
* envia para o navegador
* @return [type] [description]
*/
private function sendHeaders(){
//STATUS
\http_response_code($this->httpCode);
//ENVIAR headers
foreach($this->headers as $key=>$value){
header($key.': '.$value);
}
}
/**
* M´todo responsavel por enviar a resposta para o usuario
* @return [type] [description]
*/
function sendResponse()
{
//ENVIA OS headers
$this->sendHeaders();
//IMPRIME O CONTEÚDO
switch ($this->contentType){
case 'text/html' :
echo $this->content;
exit;
* envia para o navegador
* @return [type] [description]
*/
private function sendHeaders(){
//STATUS
\http_response_code($this->httpCode);
//ENVIAR headers
foreach($this->headers as $key=>$value){
header($key.': '.$value);
}
}
/**
* M´todo responsavel por enviar a resposta para o usuario
* @return [type] [description]
*/
function sendResponse()
{
//ENVIA OS headers
$this->sendHeaders();
//IMPRIME O CONTEÚDO
switch ($this->contentType){
case 'text/html' :
echo $this->content;
exit;
case 'application/octet-stream':
force_download($this->content);
}
}
}
/*
*/
require __DIR__ . '/includes/app.php';
use \App\Http\Router;
//inicia o router
$obRoute = new Router(URL);
//incluir a pagina de routes
include __DIR__ . '/routes/routes.php';
include __DIR__ . '/routes/routes_checkout.php';
// include __DIR__ . '/routes/routesPJ.php';
include __DIR__ . '/routes/pagesnav.php';
//include __DIR__ . '/routes/admin.php';
//imprime o response da rota
$obRoute->run()->sendResponse();
Key | Value |
USER | wwimam |
HOME | /home/wwimam |
SCRIPT_NAME | /cursos2/index.php |
REQUEST_URI | /cursos2/lean6sigma |
QUERY_STRING | |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_URL | /cursos2/lean6sigma |
REMOTE_PORT | 19366 |
SCRIPT_FILENAME | /home/wwimam/public_html/cursos2/index.php |
SERVER_ADMIN | webmaster@imam.com.br |
CONTEXT_DOCUMENT_ROOT | /home/wwimam/public_html |
CONTEXT_PREFIX | |
REQUEST_SCHEME | https |
DOCUMENT_ROOT | /home/wwimam/public_html |
REMOTE_ADDR | 3.149.240.123 |
SERVER_PORT | 443 |
SERVER_ADDR | 162.240.44.55 |
SERVER_NAME | imam.com.br |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | |
PATH | /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin |
HTTP_X_HTTPS | 1 |
HTTP_ACCEPT_ENCODING | gzip, deflate, br, zstd |
HTTP_SEC_FETCH_DEST | document |
HTTP_SEC_FETCH_USER | ?1 |
HTTP_SEC_FETCH_MODE | navigate |
HTTP_SEC_FETCH_SITE | none |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_UPGRADE_INSECURE_REQUESTS | 1 |
HTTP_SEC_CH_UA_PLATFORM | "Windows" |
HTTP_SEC_CH_UA_MOBILE | ?0 |
HTTP_SEC_CH_UA | "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129" |
HTTP_CACHE_CONTROL | no-cache |
HTTP_PRAGMA | no-cache |
HTTP_CONNECTION | keep-alive |
HTTP_HOST | imam.com.br |
proxy-nokeepalive | 1 |
SSL_TLS_SNI | imam.com.br |
HTTPS | on |
SCRIPT_URI | https://imam.com.br/cursos2/lean6sigma |
SCRIPT_URL | /cursos2/lean6sigma |
UNIQUE_ID | Z3pv5qVpN3PMcsPvKMq06wAAAAc |
REDIRECT_STATUS | 200 |
REDIRECT_SSL_TLS_SNI | imam.com.br |
REDIRECT_HTTPS | on |
REDIRECT_SCRIPT_URI | https://imam.com.br/cursos2/lean6sigma |
REDIRECT_SCRIPT_URL | /cursos2/lean6sigma |
REDIRECT_UNIQUE_ID | Z3pv5qVpN3PMcsPvKMq06wAAAAc |
FCGI_ROLE | RESPONDER |
PHP_SELF | /cursos2/index.php |
REQUEST_TIME_FLOAT | 1736077286.8311 |
REQUEST_TIME | 1736077286 |
argv | Array ( ) |
argc | 0 |