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
https://stackoverflow.com/questions/39824219/install-php-5-3-or-5-4-on-ubuntu-16-04-xenial-and-apache | |
https://everton.rocks/conteudo/multiple-php-versions-apache | |
sudo a2dismod php5.6 && sudo a2enmod php7.2 && sudo service apache2 restart |
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
https://github.com/peachpiecompiler/peachpie/ | |
http://gabsferreira.com/instalando-e-usando-o-net-core-no-linux/ | |
https://docs.peachpie.io/ |
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
$valid_passwords = array ("mario" => "carbonell"); | |
$valid_users = array_keys($valid_passwords); | |
$user = $_SERVER['PHP_AUTH_USER']; | |
$pass = $_SERVER['PHP_AUTH_PW']; | |
$validated = (in_array($user, $valid_users)) && ($pass == $valid_passwords[$user]); | |
if (!$validated) { | |
header('WWW-Authenticate: Basic realm="My Realm"'); |
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
$campodata->setOption('triggerEvent', 'dblclick'); | |
//alterar as configurações da data thema4 | |
function tdate_start( id, mask, language, size, options) { | |
$( id ).wrap( '<div class="tdate-group date">' ); | |
$( id ).after( '<span class="btn btn-default tdate-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>' ); | |
$( id ).bootstrapMaterialDatePicker({ | |
lang: language, |
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
//Validação no cliente | |
$this->form->setClientValidation(true); //habilita validação no navegador | |
$nome->setProperty('oninvalid',"this.setCustomValidity('Preencha o campo')"); | |
$nome->setProperty('oninput',"setCustomValidity('')"); | |
//postar dados sem sair da página | |
TApplication::postData('form_', 'Class_', 'onReload'); | |
//executar função após salvar com refresh | |
$this->setAfterSaveAction( new TAction([$this, 'onClose'])); |
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 ConexaoPrepare extends TPage | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
try | |
{ | |
TTransaction::open('curso'); |
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 | |
if (isset($_GET['file'])) | |
{ | |
$file = $_GET['file']; | |
$info = pathinfo($file); | |
$extension = $info['extension']; | |
$content_type_list = array(); | |
$content_type_list['txt'] = 'text/plain'; | |
$content_type_list['html'] = 'text/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
<?php | |
/** | |
* <?php | |
/** | |
* FormDBAutoSelectionView | |
* | |
* @version 1.0 | |
* @package samples | |
* @subpackage tutor | |
* @author Pablo Dall'Oglio |