Posts by girorme • 587 points
17 posts
-
2
votes1
answer289
viewsA: Group the values of a PHP array according to the same key.
Following the structure of the presented array you can follow a simple iteration in the data and build the future array: <?php $registroGeral = [ 'Janeiro' => [ [ 'nome' => 'Pessoa1',…
-
1
votes2
answers101
viewsA: Form with PHP sends POST variables to same page with jQuery without reloading
Complementing the @Cvictor-stafusa response (The amendments cited by him are essential): You are calling the method preventDefault() without invoking the Event parameter in the event of the click…
-
0
votes2
answers1722
views -
1
votes2
answers38
viewsA: Preg_replace_callback put text before number
Another possible solution using regex: $linha = '500 - Antonio: Idade: 35 anos'; $novaLinha = preg_match('#^\d#', $linha) ? sprintf('Id: %s', $linha) : $linha; echo $novaLinha . PHP_EOL; // Id: 500…
-
0
votes2
answers129
viewsA: Meaning of "$" in . htaccess
Of documentation: The . htaccess files (or "distributed configuration files") offer a way to make changes to the per-directory settings. A file, containing one or more settings guidelines, is placed…
-
1
votes1
answer557
viewsA: How to insert a data set of an array into the WEBSQL with Ionic?
You are filling the item variable with the last loop element: for (var i = 0; i < $scope.bebidasextras.length; i++) { var item = $scope.bebidasextras[i]; // Aqui item pega o último elemento do…
-
2
votes1
answer752
viewsA: Where are Websql databases saved in Chrome?
In the browser paste: chrome://version. Inside the directory displayed in: Profile Path or Caminho de perfil there will be a folder called databases. There you’ll find what you’re looking for.…
-
1
votes1
answer1099
viewsA: Thread Usage in PHP
You are trying to install the version not compatible with php currently installed. From what I noticed the version used is: C:\wamp\bin\php\php7.0.10 And you are trying to install a version of the…
-
13
votes3
answers689
viewsA: phpMyAdmin is insurance against bruteforce?
According to phpMyAdmin documentation here, it is recommended to use logs for controlling access attempts since there is nothing official to "bypass" a brute force attack. This means you need to use…
phpmyadminanswered girorme 587 -
0
votes2
answers56
viewsA: Error while fetching Mysql data with PHP
You are passing raw from the query instead of going to Resource: mysql_num_rows($sql) In addition, the mysql_* function is being used and not mysqli_* as required. The right thing would be::…
-
0
votes1
answer145
viewsA: Cordova + Ionic installation error using Node.js
Try to clear the cache and run the commands again: npm cache clean npm install -g cordova ionic
-
3
votes1
answer856
viewsA: PHP - CURL Session ended?
You do not reuse cookies and therefore do not have the correct answer. A tip is to create methods for each type of request, where these will reuse cookies: function getRequest($url, $myCookieFile) {…
-
-1
votes1
answer280
viewsA: How do I show the path of the php script running under the linux ps command?
Maybe this will help you $ sudo ls -l /proc/PID/exe In the example below I look for the adb: $ ps aux | grep adb root 7811 0.0 0.0 30424 2468 pts/12 S+ 18:03 0:00 adb logcat $ sudo ls -l…
-
1
votes1
answer41
viewsA: Doubt with sql on Laravel?
Just pack the group by from the previous query, no need to remove DB::raw. $atividades = $this->atividade->select(DB::raw ('sum(num_total_pessoas) as total_pessoas, sum(convite_prod) as…
-
1
votes3
answers458
viewsA: Search database table information with PHP every 10 minutes
the ideal would be for you to use cronjob for greater effectiveness and keep your code clean. By php vc could leave your script in infinite loop: <?php set_time_limit(0); error_reporting(E_ALL);…
-
0
votes2
answers3860
viewsA: Grab a value inside the HTML Curl
Hello friend you can try this solution with Regex ( I made a simple class for the test) : <?php /** * A simple crawler * By Rodrigo Nascimento * */ set_time_limit(0); error_reporting(E_ALL);…
-
3
votes1
answer918
viewsA: Scan all pages, Curl
You need to make a request for each page and capture the content within it. Assuming the start url is: http://site.com/page/1 Soon we can create a class to perform "Crawler" on all pages with a…