Posts by Developer • 121 points
7 posts
-
2
votes1
answer26
viewsA: I am unable to iterate the array
Your code has no difference with the code below: let loggedUserCategories = []; res.send(loggedUserCategories); categoriesId.forEach(async(id) => { const category = await…
-
0
votes1
answer54
viewsA: Starting in POO (PHP) and I have the following question;
You can use (new conta())->autenticacao() at the end of the class declaration. To avoid ifs you can create more files, for example autenticacao.php containing: require_once 'func.php'; (new…
-
1
votes1
answer47
viewsA: How do I display the source code inside my PHP page without it being interpreted?
Replaces the < character with the code < and > with >.
-
1
votes1
answer37
viewsA: My user does not handle files generated in PHP
You should put chmod 775 for the files created by www-data, so users of the same group can make changes. If you have root access on the server you can put the default value of the permission of the…
-
0
votes1
answer19
viewsA: I can’t access the filter variable in the view or controller
At the url, try ?filter=[amount]=500 (without single quotation marks). Or try access with $_GET['filter']["'amount'"].
-
0
votes1
answer79
viewsA: Identify sequential records between a short period of time
Try to modify your select. Considering that each access can be considered Flood or not depending on the previous accesses, you can add a column to count these accesses like this: SELECT…
-
2
votes3
answers133
viewsA: Is it possible to leave the delay argument of the dynamic setInterval?
Probably you can achieve using setTimeout. var tempo = 1000; function x() { tempo = Math.random()*1000; // altera o tempo aqui setTimeout(x,tempo); console.log("executou") } let mostrarBaloes =…