Posts by Carlos Rocha • 1 point
426 posts
-
2
votes1
answer37
viewsQ: Image does not align
I have the following report I’m doing for learning purposes. ul.ulHorizontal { height: 50px; } ul.ulHorizontal li { display: inline-block; line-height: 50px; } <ul class=ulHorizontal…
-
0
votes3
answers32
viewsA: Concatenation in function checks
The problem was in the quotation marks here: onclick="return verifica(\'' . $mensagemBloquear . '\');" Instead of putting single quotes escapes was putting double quotes: onclick="return…
-
0
votes3
answers32
viewsQ: Concatenation in function checks
$linkBloquear = ' <a href= "?produtos&bloquear&idProdutos=' . $produtos->getIdProdutos() . '" onclick="return verifica(' . $mensagemBloquear . ');" > ' . $imagemBloquear . '…
-
1
votes0
answers36
viewsQ: simplexml_load_file() does not recognize urlldecode
I have the following class for the calculation of distances: <?php class CalculaFrete { # funcao de calculo da distãncia private function calculaDistancia(string $_cidade, string $_estado) :…
phpasked Carlos Rocha 1 -
-2
votes2
answers154
viewsQ: Removes spaces produced by line breaks
Because the code below does not remove spaces, only line breaks? $urlCorreios = "http://ws.correios.com.br/calculador/CalcPrecoPrazo.aspx? nCdEmpresa=& sDsSenha=& nCdFormato=1&…
phpasked Carlos Rocha 1 -
0
votes1
answer80
viewsQ: declare(strict_types=1); display errors
I’m starting to use language heavily typed in PHP 7. declare(strict_types=1); But I couldn’t find a way to debug the bug and show where it is. I searched hard but couldn’t find. What should I wear?…
-
0
votes0
answers31
viewsQ: PDO displaying the populated query
Well, here’s the thing function: public function inserir (ClientesModelos $_cliente) : bool { $sql = 'INSERT INTO clientes (data, nome, sobreNome, nascimento, documento, telefone, celular, email,…
-
-1
votes1
answer20
viewsQ: Error in generation of sql with datetime
I got the following method: public function inserir (ClientesModelos $_cliente) : bool { $sql = 'INSERT INTO clientes (data, nome, sobreNome, nascimento, documento, telefone, celular, email, senha,…
-
0
votes1
answer26
viewsQ: Error in instanceof in foreach
I have the following function: public function instanciaClasseArray ( $classe, $array ) : bool { foreach ($array as $objeto) : if ( !($objeto instanceof $classe) ) return false; endforeach; return…
-
-1
votes1
answer96
viewsQ: Class does not connect with PDO to the database and another class in the same path yes
I’ve got the spread connection: <?php namespace classes\conexao; use PDO; class Conexao { private static $instancia; private static $host = "localhost"; private static $db = "mvc_crud"; private…
-
0
votes1
answer91
viewsQ: Date|Time returning error
I have the Model class down below: namespace classes\mvc\modelos; use \DateTime; class ClientesModelos { private $idClientes, $data, $nome, $sobreNome, $nascimento; public function __construct (…
-
-2
votes1
answer32
viewsQ: Error passing Date as parameter
I’m creating a class with methods parameterized. The dice sane fictitious: <?php require_once '../../../erros.php'; class ClientesModelos { private $idClientes, $data, $nome, $sobreNome,…
-
-1
votes2
answers93
viewsQ: How to validate return of a method like php7 object array?
So I was able to create a class with a method for verify if the return of one another function is a boolean: Technically and there would enter the orienteering of you, it works like this: class…
php-7asked Carlos Rocha 1 -
0
votes1
answer45
viewsA: How to search for all classes found in a tree?
I got: spl_autoload_register(function($class){ $pasta = "class"; $listar = new RecursiveDirectoryIterator( $pasta ); $recursivo = new RecursiveIteratorIterator( $listar ); foreach ( $recursivo as…
-
-2
votes1
answer45
viewsQ: How to search for all classes found in a tree?
Imagine the setting where I have the following structure of tree: class / conexao / conexao.php mvc / modelos / PessoasModelos.php visoes / PessoasVisoes.php controles / PessoasControles.php util /…
-
0
votes3
answers231
viewsA: Do require_once within the classes. Is it possible?
Another resolution I got ma now using spl_autoload_register php connection. class Conexao { private $host = "localhost"; private $db = "banco"; private $user = "ususarioBanco"; private $password =…
-
0
votes3
answers231
viewsA: Do require_once within the classes. Is it possible?
The código final without the use of autoloader was like this: Connexion.php <?php class Conexao { private $host = "localhost"; private $db = "banco"; private $user = "usuarioBanco"; private…
-
0
votes3
answers231
viewsQ: Do require_once within the classes. Is it possible?
I’m trying to create a architecture new based on a need and I’m having some difficulty. So I decided to create an example minimum, complete and verifiable of the application. It is a architecture…
-
0
votes0
answers226
viewsQ: Problems with Curl in PHP 721
So I graduated, man Notebook and I was reinstall the Apache I installed Apache + PHP 721+ Mysql. Everything works. I went to try a phone call with Curl and gave error: [Thu Apr 18 16:41:34.354241…
-
0
votes1
answer26
viewsQ: Code stating which method does not exist but method is in Class
I have the array down that comes from a consultation to the database using a class: Array ( [0] => Estudos Object ( [idEstudo:Estudos:private] => 12 [assunto:Estudos:private] => Teste…
phpasked Carlos Rocha 1 -
1
votes1
answer172
viewsQ: Divs do not appear with display: block and rollover effect does not work
$(document).ready(function(){ $("img.menuAdmin").click(function(){ $(this).css("display","none"); $("div.menuAdmin div.dropdown").css("display","block"); $("div.menuAdmin div.dropdown…
-
0
votes0
answers19
viewsQ: Merge spans with display::inline-block equal as with float:left
div.dropdown { position: relative; display: inline-block; background-color: #CCC; margin: 0; padding: 0; } div.dropdown span { display: block; width: 200px; height: 30px; line-height: 30px;…
-
-1
votes1
answer140
viewsQ: Extreme difficulty generating PDF with PHP or Javascript
Extreme difficulty generating PDF with PHP or Javascript I’m here at the attempt of generate PDF file for HTML. I made 3 attempts. The HTML and the CSS are the same to the 3 attempts. Try 1 ->…
-
0
votes1
answer80
viewsQ: Div display:None hiding the rest of the code after it
I got the following code: $htmlPDF = $html; $html .= ' <div style="display:none;" id="conteudoHTML">' . $htmlPDF . '</div> <button type="button" class="button"…
-
0
votes1
answer46
viewsQ: SPANS do not rotate with Rotate and direction inside the LI
I got the following código down below: ul { width: 802px; list-style: none; border: .1px #000 solid; padding: 0; } ul#tabela { height: 200px; } ul#retornos { height: 30px; } ul li { height: 100%;…
cssasked Carlos Rocha 1 -
-1
votes1
answer432
viewsQ: Problems to generate PDF with mPDF
I’m having 3 problems with that code for generate PDF with the mPDF: 1 ) Are being generated 4 pages instead of 1 which is what the content fills. 2 ) The style CSS doesn’t work 3 ) A only image who…
mpdfasked Carlos Rocha 1 -
1
votes1
answer269
viewsQ: insert CSS file into FPDF
I got the following code: $estiloSite = file_get_contents('http://localhost/wesleyanagceu.com.br/_scripts/_css/style.css'); $estiloAdmin =…
phpasked Carlos Rocha 1 -
0
votes1
answer43
viewsQ: insert Style into PDF
I have the following content HTML being generated in a loop PHP $html .= " <ul class='border'> <li style='text-align: left; border-bottom: .1px rgb(0,0,0) solid;'><label…
phpasked Carlos Rocha 1 -
0
votes2
answers62
viewsA: Input value being displayed in HTML
Solved: html .= ' <form action="pdf.php" method="post"> <input type="hidden" name="htmlPDF" value="' . $htmlPDF . '</div>" /> <input type="submit" class="button formularios"…
phpanswered Carlos Rocha 1 -
0
votes2
answers62
viewsQ: Input value being displayed in HTML
Within a variable PHP have a content HTML. to be shown. So I did $htmlPDF = $html; $html .= " <form action='pdf.php' method='post'> <input type='hidden' name='htmlPDF' value='" . $htmlPDF .…
phpasked Carlos Rocha 1 -
0
votes2
answers53
viewsQ: Create object from an array
I got the following array JS on the return of $.ajax shrunk from PHP (json_encode($array)): { "17":[ { "data":"2019-03-01", "ofetas":"22.65", "decisoes":"6" }, { "data":"2019-03-03",…
javascriptasked Carlos Rocha 1 -
-1
votes1
answer93
viewsQ: Error generating obj with JSON.parse()
I have the code s following that works well var ctx = $( "#myChart" ); var datasets = [ { label: "Gcéu 1", data: [ { x: "2019/03/01", y: 20 }, { x: "2019/03/02", y: 10 }, { x: "2019/03/05", y: 5 } ]…
-
-1
votes1
answer75
viewsQ: Grafico Google Charts
I found this example on the line-chasrts website <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script…
javascriptasked Carlos Rocha 1 -
0
votes2
answers602
viewsA: Get the date before an informed one
var date = '2019-01-01'; var d = new Date( date ); d.setDate( d.getDate() ); splite = d.toLocaleDateString('pt-BR').split("/"); dia =splite[0]; mes =splite[1]; ano =splite[2]; data = ano + "/" + mes…
-
1
votes2
answers602
viewsQ: Get the date before an informed one
var date = '2019-01-01'; var d = new Date( date ); d.setDate( d.getDate() ); document.write(d); Returned that: Mon Dec 31 2018 22:00:00 GMT-0200 (Brasilia daylight saving time) How do I now return…
-
0
votes1
answer98
viewsQ: Deliver PHP array from ajax to HTML field
Well, I’m wearing it $.ajax to recover a json_encode() in an archive PHP. In that file is populous one form: $html .= " <input type='hidden' id='dados' value='" . $relatoriosGr . "' />…
-
0
votes1
answer84
viewsQ: Input Hidden receive $.ajax array
I have a $.ajax who receives from PHP json_encode( array ($html, $relatoriosGr) ); That one Return of $.ajax, will popular a input Hidden with the index 1 of result: success: function (result) {…
-
1
votes1
answer21
viewsQ: Button generated within $.ajax return does not work
I need some help here. So I’m using $.ajax of jQuery to fetch data in the database and enter a php variable $html that will bring a content already ready. The problem is that in that contents I have…
-
1
votes2
answers104
viewsA: Center span in div using flexbox
I got: span.vertical { writing-mode: vertical-lr; transform: rotate(180deg); } span.comum { } div.cabecalhoVertical{ display: flex; height: 200px; border: .1px rgb(0,0,0) solid; }…
-
1
votes2
answers104
viewsQ: Center span in div using flexbox
I’m using positions to use the top and the left but it still doesn’t look cool. CSS: span.vertical { writing-mode: vertical-lr; transform: rotate(180deg); height: 200px; } span.comum { width: 100%;…
-
3
votes1
answer58
viewsQ: Rotate spans in the LI
I have the code down that works normally. But it contains a flaw. If you’ll notice, the first and the third div’s are without class. Does that mean that don’t want rotate your spans. But, not…
-
1
votes2
answers54
viewsQ: Vertical distance between LI’s
ul.ulVertical { border: .1px rgb(0, 0, 0) solid; list-style: none; width: 800px; height: 100px; } ul.ulVertical li { display: inline-block; width: 100px; height: 30px; text-align: center;…
-
1
votes2
answers89
viewsQ: Li s leaving UL
HTML and CSS: ul.ulVertical { border: .1px rgb(0, 0, 0) solid; list-style: none; height: 100px; } ul.ulVertical li { display: inline-block; border-top: .1px rgb(0, 0, 0) solid; transform:…
-
0
votes1
answer124
viewsQ: Validate explodes
Code: $pessoa = "CARLOS"; $nome = explode ( " ", $pessoa, 2)[0]; $sobreNome = explode ( " ", $pessoa, 2 )[1] == null ? "VAZIO" : "sobreNome: " . explode ( " ", $pessoa, 2 )[1] ; print "Nome: " .…
phpasked Carlos Rocha 1 -
1
votes1
answer559
viewsA: Picpay integration: Problem
Solved: The only drawback here is that Picpay on the payments screen asks to scan a Code . And this might not be so easy on Desktops. What will make life very difficult for us! We’ll most likely…
-
1
votes1
answer559
viewsQ: Picpay integration: Problem
I’m having trouble with the Gateway Picpay to make a integration. I’m following the manual informed by them on link down below: https://ecommerce.picpay.com/doc/ Good I’m doing so: <?php $urlLoja…
-
0
votes0
answers383
viewsQ: Curl passing and receiving parameters?
I have the link $page below: $pagina = 'http://www.google.com'; I’d like to know the difference between: $ch = curl_init($$pagina); and: $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $pagina );…
-
2
votes0
answers55
viewsQ: Query return interaction with Array
SQL: SELECT t.idMembro, t.nomeTabela from ( SELECT idMembro as idMembro, 'pastores' as nomeTabela FROM pastores union SELECT idLider as idMembro, 'redes' as nomeTabela FROM redes union SELECT…
-
0
votes1
answer48
viewsQ: When adding HTML gives header error
page: <?php header("Content-Type: text/html; charset=utf-8"); ?> <html> <head> <title>Gceu IMW Muriaé - São Cristóvão </title> <meta http-equiv="Content-Type"…
-
0
votes1
answer35
viewsA: echo within $.ajax
Solution: if ( $celulasReuniao->getSupervisao() == "s" ) { $echoSupervisao = " <li class='centralizado' style='width:10%; border-left: .1px solid rgb(0,0,0);'><label style='visibility:…