This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tabela que armazenará os métodos | |
CREATE TABLE `metodos` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`classe` varchar(50) DEFAULT NULL, | |
`metodo` varchar(50) DEFAULT NULL, | |
`identificacao` varchar(100) DEFAULT NULL, | |
`privado` tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Base extends CI_Controller { | |
public function Index() { | |
$this->output->cache(10); | |
$this->load->view('pagina_em_cache'); | |
} | |
public function Remove_cache() { | |
$this->output->delete_cache('cache'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="pt_BR"> | |
<head> | |
<meta charset = "utf-8"> | |
<title>Criando cache de páginas com CodeIgniter</title> | |
</head> | |
<body> | |
<h1>Essa página vai ficar no cache por 10 minutos.</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function Index(){ | |
// Carregamos a library PHPlot | |
$this->load->library('PHPlot'); | |
//Definindo os dados do gráfico | |
$dados = array( | |
array('a',3), | |
array('b',5), | |
array('c',7), | |
array('d',8), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function Comtitulos() | |
{ | |
$this->load->library('PHPlot'); | |
//Define os títulos | |
$this->phplot->SetTitle("Titulo do Grafico"); | |
$this->phplot->SetXTitle('Eixo X'); | |
$this->phplot->SetYTitle('Eixo Y'); | |
//Define os valores para geração do gráfico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function __construct(){ | |
parent::__construct(); | |
$this->load->library('PHPExcel'); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function Index() | |
{ | |
// Definindo o nome do arquivo (repare no uso da extensão .php, ela será substituída posteriormente por .xls ou .xlsx) | |
$fileName = "PHPExcelFile.php"; | |
// Definindo o path de salvamento do arquivo | |
$saveFilePATH = "./files/".$fileName; | |
// Cria um novo objeto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function Formulas() | |
{ | |
// Definindo o nome do arquivo (repare no uso da extensão .php, ela será substituída posteriormente por .xls ou .xlsx) | |
$fileName = "PHPExcelFormulas.php"; | |
// Definindo o path de salvamento do arquivo | |
$saveFilePATH = "./files/".$fileName; | |
// Cria um novo objeto PHPExcel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*--------------------------------------------------------------- | |
* ERROR REPORTING | |
*--------------------------------------------------------------- | |
* | |
* Different environments will require different levels of error reporting. | |
* By default development will show errors but testing and live will hide them. | |
*/ | |
switch (ENVIRONMENT) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Exit Status Codes | |
|-------------------------------------------------------------------------- | |
| | |
| Used to indicate the conditions under which the script is exit()ing. | |
| While there is no universal standard for error codes, there are some | |
| broad conventions. Three such conventions are mentioned below, for | |
| those who wish to make use of them. The CodeIgniter defaults were | |
| chosen for the least overlap with these conventions, while still |