Posts by Fabiano Monteiro • 1,192 points
54 posts
-
0
votes1
answer49
viewsA: Comparing PHP imprint array
If the data always returns sorted, as defined in your question and that the list of boundary is responsible for assembling the cells of the table, for its logic of 0. It makes me think that at no…
phpanswered Fabiano Monteiro 1,192 -
3
votes1
answer79
viewsA: Is there any way to recover which Pdostatement in the PHP PDO was created?
It is possible from version 7.2 onwards to view the information contained in an instruction that has been mounted on $dbh->prepare which prepares an SQL statement to be executed by the method…
-
1
votes1
answer66
viewsA: Insert data into database using PDO
Use the variables in your DSN, remove the spaces of type(host = $servidor) and set the door even if it’s the standard that is 3306. <?php $servidor="localhost"; $usuario="root"; $senha="";…
-
1
votes1
answer55
viewsA: timezone_type attribute of the Datetime class
The three different types of Datetime objects: Type 1 - UTC offset UTC compensation is the difference in hours and minutes of Coordinated Universal Time (UTC) for a given location and date. new…
phpanswered Fabiano Monteiro 1,192 -
0
votes1
answer41
viewsA: Get value for select JS/PHP
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"> <label for="higiene">Higiene</label> <select name="higiene" id="higiene" class="form-control" required…
-
1
votes1
answer44
viewsQ: Error in logic to replace all phrases within an x file using Bash Shell Script
How can I replace all the same phrases within a file, using Bash Shell Script, when receiving the value to be replaced from a variable? 1 - How I would like - but it doesn’t work.:…
-
1
votes2
answers162
viewsA: How to make URL friendly without apache mod_rewrite?
Answering your question: Here comes the real doubt: In your opinion, dear Experienced developers, does this look like a lot of skulking? there is another more elegant way to make the url friendly…
-
1
votes1
answer37
viewsA: _wdt route error after installing Profiler on a basic Symfony 4 structure
With permission issues, the cache was not being cleared. After solving the permissions issue, a simple: bin/console cache:clear solved the problem and debug bar Profiler appeared.…
-
0
votes1
answer37
viewsQ: _wdt route error after installing Profiler on a basic Symfony 4 structure
In a basic installation of Symfony 4, unlike the full installation, it does not come with the debug profiler - development tool that provides detailed information on the execution of any order.…
-
1
votes2
answers50
viewsA: Table position
Just use the post-increment operation. Note: Increment/Decrease operators only affect numbers and strings. Arrays, objects and resources are unaffected. Decrement NULL does not generate effects, but…
-
1
votes1
answer140
viewsA: Error using filter_input in PHP
There is a filter_input loose, aimless in the first line of your code. What is the purpose of: filter_input(INPUT_POST, 'dataInicial', FILTER_SANITIZE_STRING); It must be removed from the code. Then…
-
3
votes1
answer164
viewsQ: About the behavior of userland functions and internal functions in PHP
There is a proposal to unify the behavior of userland and internal functions in the PHP 8. That currently in particular, when internal functions fail to parse argument types correctly, they fail to…
-
0
votes1
answer160
viewsA: Associate user data according to "/profile/username" url
Hello! Being your users authors, then you can pick up the nickname by URL. This code needs to stay in the PHP file, Author.php. You find the default template on: Codex.wordpress.org/Author_templates…
-
2
votes1
answer980
viewsA: How do you create "build" icons, "download" icons in the description of a project on github?
They stay in the README file. If you click on Raw or edit Readme.Md of any project, you can see the code and how an icon was applied. On your question regarding the badges/icons that are after the…
-
0
votes2
answers935
viewsA: Leave form fields aligned and of the same size
Inside your fieldset, use the tag <label>. The tag <label> defines a label for the element <input>. Then change your natural behavior inline for block, set a width for the element…
-
0
votes4
answers519
viewsA: Remove last space from a variable
If you want to remove whitespace only from the end of a string, use the function rtrim(). 'Fulano De Tal ' //Fulano De Tal// ithrim() removes whitespace only from the beginning of a string. ' Fulano…
-
0
votes1
answer168
viewsA: how do I use php to separate the information into a json_encode variable?
You have assembled an array $total_prod[] = $val['TOTAL']; I just don’t know what your goal is json_encode($total_prod) in it, if you at the end just want to give a print? Travels with foreach, the…
-
0
votes2
answers347
viewsA: Dynamic redirection with PHP Switch Case
See that the initial error is in the omission of the statement break. See what the PHP manual says about this: It is important to understand how the switch statement is executed in order to avoid…
-
0
votes2
answers258
viewsA: How to update or choose a specific version of phpMyAdmin when using Docker-Compose.yml?
To the phpMyAdmin, the oldest possible image to be used using Docker to assemble container is that of version 4.6. So for test level or whatever the intention, a previous version image cannot be…
-
6
votes2
answers640
viewsQ: How to allow white space in any part of the sequence in a regular expression?
I have a field that accepts at least 12 alphanumeric characters, including 9 numeric characters. But there is a catch, that accepts white space whatever the position. function validaCampo(sCampo) {…
-
0
votes2
answers258
viewsQ: How to update or choose a specific version of phpMyAdmin when using Docker-Compose.yml?
Using the file Docker-Compose.yml to ride my containers, I know I can choose any version for the chosen service, for example: mariadb: or mariadb:10.4. But using the settings for phpMyAdmin, if…
-
3
votes1
answer93
viewsQ: What exactly is the Datetime::createFromImmutable() method for?
What exactly is the method for DateTime::createFromImmutable()? Implemented according to the release note of version 7.3.0 of PHP.
-
5
votes1
answer54
viewsA: Does not send html by email php
Substitute: $header .= "Content-type: text/plain; charset=iso-8859-1\n"; for: $header .= "Content-Type: text/html; charset=iso-8859-1\r\n"; The line Content-Type: text/html tells the Mailer and the…
-
0
votes2
answers49
viewsA: How to query multiple columns
You can not forget the parameters in $vbusca = array();, for each more field, you need to add to the parameter. If you want to search for the same content, for example in book title or book type,…
-
0
votes1
answer75
viewsA: PDO does not execute query
You need to define the field that will receive the search post, right after the clause WHERE. I will take a search for the name of the book. See your full code, where I removed your field vbusca,…
-
0
votes5
answers280
viewsA: Breaking lines in a date attribute when displaying in front-end
PHP_EOL is ostensibly used to find the new line character in a multi-platform compatible manner. PHP_EOL represents the finishing character for the current system, unlike an html tag tag like the…
-
2
votes1
answer598
viewsA: PHP/ HTML calendar - How to break table into 7 columns
Hello! I will spend the way I build a calendar. I’m sorry I didn’t assemble based on your, but look at the comments specific to each part of the logic of the code that answers your question…
-
1
votes1
answer76
viewsA: Page loads normally but with 404 status
Hello. This problem is related to the permissions of the folder where the login file is. First check which permission is set in the folder, then do a test changing to chmod -R 777, but then check…
-
0
votes1
answer115
viewsA: How to list in Windows Explorer the www directory of Linux/Ubuntu that runs on the Windows Subsystem for Linux (WSL) of Windows 10?
First, it is not recommended to handle these folders on Windows Explorer. If you want to copy, move, edit or delete files from folder, you need to do it inside the bash with the line tools command.…
-
-1
votes1
answer115
viewsQ: How to list in Windows Explorer the www directory of Linux/Ubuntu that runs on the Windows Subsystem for Linux (WSL) of Windows 10?
I need to list the files that are on var/www Ubuntu that runs on WSL, so you can make a file copy. How to view them by Windows Explorer so that an application running on Windows will copy such a…
-
0
votes2
answers72
viewsA: How to assemble a basic Virtualhost to rewrite Urls in my Xampp htdocs project
Would that be: <VirtualHost projeto:80> ServerAdmin webmaster@projeto ServerName projeto DocumentRoot "C:/xampp/htdocs/projeto" <Directory C:/xampp/htdocs/projeto> AllowOverride None…
-
0
votes2
answers72
viewsQ: How to assemble a basic Virtualhost to rewrite Urls in my Xampp htdocs project
Following the model proposed in the file itself httpd-vhosts.conf <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/dummy-host.example.com"…
-
0
votes2
answers103
viewsQ: How can I select a range of items, after some values using SQL IN operator
For example: I want to fetch, 1,2,5,7,11 and then the rest up to 100, in a DQL SELECT. Ex.: SELECT column_name(s) FROM table_name WHERE column_name IN (1,2,5,7,11 ... value100); In case my doubt is…
-
0
votes1
answer117
viewsA: Mysql - How to get results that were not found
Remembering that the following solution fits when the need to use is something that compares to what is used in NOT IN, IN. Something with little values. See if this way helps you in something:…
mysqlanswered Fabiano Monteiro 1,192 -
1
votes1
answer510
viewsQ: Does Docker always check that the local image is of the same or lower version as the official Docker Hub repository?
When lifting a new application, you don’t have the image locally, so Docker fetches the image that is the container’s base. Once the image has been downloaded, Docker raises the container. The…
-
0
votes1
answer701
viewsA: Problem with Docker Pdo installation
Replace the RUN apt-get update && \ for RUN apt-get update && apt-get install -y \ Add right after && docker-php-ext-install pdo pdo_mysql Dockerfile FROM php:apache RUN…
-
3
votes1
answer84
viewsA: Mysql table with datetime field, how to know how many days have passed?
I can give you two different ways to do this. Remembering that the comparison is made with the server time. 1st SELECT CONCAT( FLOOR(HOUR(TIMEDIFF(prod_data_cadastro,NOW())) / 24), ' dias ',…
-
3
votes1
answer3583
viewsA: Delete line breaks in an echo in PHP
Then try to perform a search for a regular expression and replace it by cleaning \r car return ("Carriage Return") and \n Newline. Behold: preg_replace( "/\r|\n/", "", $linha['dado'] ); If the match…
phpanswered Fabiano Monteiro 1,192 -
0
votes2
answers2596
viewsA: PHP array_push in array within another array
You can use a array_merge in this case. See: $arrayTudo = [array1, array2, array3]; $x = 10; $y = 20; $arrayValores = [$arrayTudo[0] => [$x, $y]]; $result = array_merge($arrayTudo,…
-
1
votes1
answer106
viewsA: Create type=Submit input inside the calendar code
Just assemble the form! By its insertion condition, all data would enter the same tuple. <!DOCTYPE HTML> <html lang="pt-pt"> <head> <meta charset="UTF-8">…
-
1
votes1
answer195
viewsA: Create combo with months to filter in the calendar
Well, I used as a basis a function, which can be seen in: php.net I hope you advance from this code I leave here. Using mini calendar in Jquery, much richer, opening the possibility to also choose…
-
9
votes4
answers1171
viewsA: What is the difference between -= and =-?
Hello! I know that your doubt has been solved by friends. I will only share one more explanation about it, as it is the one I usually pass when someone asks me the same question. Then goes as "a…
-
1
votes1
answer311
viewsA: Ireport and php 7.0
iReport as a report generator currently displays this message stating that such a feature is considered obsolete. Even for PHP5 version it runs, it has been giving some bugs. There is something…
-
0
votes1
answer73
viewsA: Vertical text / HTML_CSS
Changing your code a little, paying attention to the use of tags <a> and <nav> CSS code: /* defina uma largura fixa para todo o menu*/ .navigation { width: 100px; } /* redefinir suas…
html5answered Fabiano Monteiro 1,192 -
1
votes0
answers562
viewsQ: Is it possible to send an application defined in Docker-Compose.yml to Heroku?
Well, I have an application running on the Docker environment, but I use Docker-Composer.yml and not Dockerfile to define services, etc. Is it only possible to send an app if it is mounted on…
-
0
votes1
answer430
viewsA: How to pass as a parameter in an item method of a foreach, a URL variable?
Well, I was able to solve it using sessionScope. Only this way was it possible to set the attribute(client) and use it as parameter in ${dao.findItens(client)}. <c:choose> <c:when…
-
0
votes1
answer430
viewsQ: How to pass as a parameter in an item method of a foreach, a URL variable?
I am developing a project in Java, academic work. My question is in the following. I can display items related to a logged in user, where the value(nick) is set in a session with login name. Behold:…
-
2
votes1
answer395
viewsA: UML aggregation X composition
It is an interesting question. It has to do with the Use Case - Customer -> Order. Describing the main functionalities of the system and the interaction of these functionalities with the users of…
-
0
votes1
answer190
viewsA: SQL: Record counter with grouping of data from different fields
According to the question: "I need to count the numbers of records that have the same crossing and group it" Then we would have: SELECT DISTINCT COUNT(id), rua || ' - ' || cruzamento As…
-
1
votes2
answers82
viewsA: Font reponsive with css
In standard EM, 1 MS usually equals 16 pixels, that is, the measure that the browser considers as standard for texts. Using MS is a question of accessibility, as people with difficulty reading can…