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 | |
header('Access-Control-Allow-Origin: *'); // no cabeçalho | |
$array = array ('test1', 'test2', 'test3'); | |
echo json_encode ($ array); | |
?> |
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
var test1 = 'test1'; | |
var test2 = 'test2'; | |
app.request.get ('pagina.php', { | |
FIELD1: teste1, | |
FIELD2: test2, | |
}, function (data) { | |
JSON.parse (data) // transforms into JSON array | |
console.log (data); // prints on the console the return | |
}) |
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> | |
<title> TESTE AJAX </title> | |
<body> | |
<button>CLIQUE AQUI</button> | |
<div id="teste"> </div> | |
</body> | |
</html> |
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> | |
<title> TESTE AJAX </title> | |
<body> | |
<button onclick="nome_da_funcao()">CLIQUE AQUI</button> | |
<div id="teste"> </div> | |
</body> | |
</html> |
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
apt-get update && apt-get upgrade | |
apt-get install python-software-properties | |
add-apt-repository ppa:ondrej/php | |
apt-get update | |
apt-get install php7.2 | |
apt-get install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml |
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
# bin bash! | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install python-certbot-apache | |
sudo certbot --apache -d example.com | |
sudo certbot --apache -d example.com -d www.example.com | |
sudo certbot renew --dry-run |
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
# EXTENSÕES PHP | |
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip | |
# INSTALANDO O COMPOSER UBUNTU 16+ | |
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
#PERMISSÕES PASTA PROJETO | |
sudo chown -R www-data:www-data /var/www/html/MyProject/ | |
sudo chmod -R 755 /var/www/html/MyProject/ |
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
/** | |
* | |
* @var db Base de dados para backup e restauracao | |
*/ | |
var db = window.openDatabase("CAMINHO DO BANCO", "1.0", "NOME DO BANCO", 5 * 2048); | |
/** | |
* Mostra o erro de arquivo | |
* @param {obj} error Recebe o objeto de erro | |
* @returns {void} | |
*/ |
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
TIPOS DE CAMPOS SUPORTADOS | |
------------------------------- | |
$table->bigIncrements('id'); Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column. | |
$table->bigInteger('votes'); BIGINT equivalent column. | |
$table->binary('data'); BLOB equivalent column. | |
$table->boolean('confirmed'); BOOLEAN equivalent column. | |
$table->char('name', 100); CHAR equivalent column with an optional length. | |
$table->date('created_at'); DATE equivalent column. | |
$table->dateTime('created_at'); DATETIME equivalent column. |
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
// Corrigindo o problema relacionado ao chasert do banco | |
// Setar 191max | |
public function boot(){ | |
Schema::defaultStringLength(191); | |
} |
OlderNewer