Posts by Lima Chaves • 161 points
11 posts
-
1
votes1
answer44
viewsA: Pick variables from the first 10 pages in descending order
To get the list of files from a folder use glob() $arquivos = glob('/caminha/da/pasta/*.php'); then, use array_slice() to catch only the first 10: $arquivos = array_slice($arquivos, 0, 10); finally,…
phpanswered Lima Chaves 161 -
1
votes1
answer667
viewsA: Error of: preg_replace_callback
Your code must be using an older version of PHP Mailer. Try updating it and make sure the error persists. https://github.com/PHPMailer/PHPMailer If you are using Composer: composer update…
-
0
votes1
answer59
viewsA: Error 500 when bringing many records
The error is happening because your script is consuming more resources than php is set to allow. You could raise the limit, but I wouldn’t recommend it because it’s the equivalent of throwing the…
phpanswered Lima Chaves 161 -
0
votes1
answer59
viewsA: Problems with MYSQL data return via include in PHP
Substitution while($colunas): for while($colunas = $selecao_geral->fetch_assoc()): to update the value of $columns for each interaction. fetch_assoc() moves the pointer in the query result on…
-
0
votes3
answers444
viewsA: How to deal with errors in case of a failure in simplexml_load_file in PHP?
It seems to me to be a case to use the try{}... catch(){}. Documentation link: http://php.net/manual/en/language.exceptions.php try { $xml = simplexml_load_file($url) } catch (Exception $e) { echo…
-
0
votes2
answers132
viewsA: Recommendation of cache plugin for wordpress Multisite
Breeze is a wordpress compatible cache plugin Multisite. Plugin name: Breeze - Free Wordpress Cache Plugin Official link: https://wordpress.org/plugins/breeze/ Follow a link with instructions on how…
-
1
votes1
answer59
viewsA: Why is my WHERE instruction not working?
In the code below there is a large error of sql syntax. Notice that entry_type is in double quotes, which makes the database treat it as a string. $pages = $conn->query('SELECT title, slug FROM…
-
2
votes1
answer45
viewsA: Suddenly error in login system
Check with var_dump if $res is an array or an object. If it is an object, change the statements as $res['nome']; for $res->nome;
phpanswered Lima Chaves 161 -
1
votes1
answer413
viewsA: Yii2 framework Multi input in the same form
Try to add <input id="form-token" type="hidden" name="<?=Yii::$app->request->csrfParam?>" value="<?=Yii::$app->request->csrfToken?>"/> within the $form tag.…
-
0
votes2
answers1084
viewsA: Maximum limit Google Maps bookmarks
Young man, comment on callback’s IF and see if the result remains the same. If you display all entries, let us know that we try to resolve from there. // if (status == 'OK') { var latlng =…
-
1
votes2
answers126
viewsA: How do I limit the use of a web application so that it can be used by Chrome?
You can do it using Browserid as Gustavo suggested. But if you want to do this limitation to avoid unexpected bugs due to lack of support for one or more features, I recommend using a library like…