Posts by Gabriel Almeida • 156 points
9 posts
-
0
votes2
answers350
viewsA: How do I set apache to ignore the directory in the url?
I believe it’s something like that: RewriteEngine On RewriteCond %{REQUEST_URI} !^/(.*)/ RewriteCond %{REQUEST_FILENAME} /.+\.html$ RewriteRule (.+) /mydir/$1 [QSA, L] This condition takes any file…
-
2
votes1
answer37
viewsA: With using conditions within a PHP method
Replace the operator = for ==, within the if. ... if ($nivel == 2) { ...
-
1
votes2
answers580
viewsA: Recover php array data via index value
From what I understand, you want to filter this array by index id and name. To do this you can use the function array_filter of PHP. Example: Filtering this array by id A220 and By name Dipirona…
-
2
votes3
answers2044
viewsA: PHP Mailer - "Could not connect to SMTP host"
Change the door to 465. Ex: $mail->Port = 465;
-
1
votes1
answer102
viewsA: Transform array records into another multidimensional array
Taking your example and turning into an array called $arr: $arr = [ "0" => [ "saldo" => "-257,21", "id_mes" => 1, "ano" => "2018" ], 1 => [ "saldo" => "-257,21", "id_mes" => 2,…
-
1
votes1
answer65
viewsA: Empty variable - PHP
Probably the start and end dates are not coming in a format accepted by the database, so it does not return any record in the method selectAllPessoa(). The datetime pattern accepted by most…
phpanswered Gabriel Almeida 156 -
0
votes1
answer82
viewsA: Replace checbox for radio
In this format you put the checkbox, the $_POST['Id'] comes to PHP as Array, to validate this, put this code snippet to get the variables $pendenteand $concluido. $registro = $_POST['Id']; $arr =…
-
1
votes2
answers284
viewsA: Image selection - phpmailer upload
It probably does not appear because it recognizes Body as text and not as HTML. In the Phpmailer configuration, before sending the message ($mail->Send()) add the line: $mail->IsHTML(true);…
-
0
votes1
answer250
viewsA: Configure Production and Approval paths on the server
It is necessary that you configure a <VirtualHost> to the server and homologation and another to the production server. apache comes with a configuration of <VirtualHost> pattern, which…